File indexing completed on 2024-05-05 05:44:43

0001 #!/bin/sh
0002 # I do not assert any rights on these few trivial lines of code, Reinhold Kainhofer
0003 
0004 # replace old function names with new function names, when all parameters stay the same
0005 #e.g.:
0006 # ./replaceRenamedDeprecated.sh setColumnStretch setColumnStretch
0007 
0008 old="$1"
0009 new="$2"
0010 
0011 for i in `grep -rle "$1" [ac-z]* | grep -v '\.svn'`; do
0012   sed "s/$1/$2/g" "$i" > "$i".new;
0013         echo "$i";
0014         diff "$i" "$i".new;
0015         mv "$i".new "$i"
0016 done