]> git.saurik.com Git - wxWidgets.git/blame - docs/mac/M5replace.sh
added missing #pragma hdrstop
[wxWidgets.git] / docs / mac / M5replace.sh
CommitLineData
1e22dfaf
GD
1#!/bin/sh
2#-----------------------------------------------------------------------------
3#-- Name: docs/mac/M5replace.sh
4#-- Purpose: Replace a string in CodeWarrior exported XML project files
5#-- Author: Gilles Depeyrot
6#-- Modified by:
7#-- Created: 08.01.2002
8#-- RCS-ID: $Id$
9#-- Copyright: (c) 2001 Gilles Depeyrot
10#-- Licence: wxWindows licence
11#-----------------------------------------------------------------------------
12
13echo -n "Replace '$1' with '$2' in xml project files? [y/N]"
14read ans
15
16if [ "$ans" != "y" ] ; then
17 exit
18fi
19
20echo "Searching for xml files..."
21files=`find ../.. -name "*.xml" -print`
22
23for f in $files
24do
25 cat $f | sed -e "s,$1,$2," > $f.new
26 if [ "`diff -q $f $f.new`" != "" ] ; then
27 mv $f.new $f
28 echo "Replaced in $f..."
29 else
30 rm $f.new
31 fi
32done