]> git.saurik.com Git - wxWidgets.git/blob - docs/mac/M5replace.sh
silence a few (harmless) HP aCC warnings
[wxWidgets.git] / docs / mac / M5replace.sh
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
13 echo -n "Replace '$1' with '$2' in xml project files? [y/N]"
14 read ans
15
16 if [ "$ans" != "y" ] ; then
17 exit
18 fi
19
20 echo "Searching for xml files..."
21 files=`find ../.. -name "*.xml" -print`
22
23 for f in $files
24 do
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
32 done