diff --git a/ChangeLog b/ChangeLog index 4d6519f5e..7726b296e 100755 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ $Source$ 2001-07-07 Marc Delisle * bug 439340: do not backquote in grant/revoke, will have to find the proper way to protect special db names + * bug 439313 extchg.sh not recursive 2001-07-07 Loïc Chapeaux * left.php3: improved the css. diff --git a/extchg.sh b/extchg.sh index 842ab3bff..1a36fe4f6 100755 --- a/extchg.sh +++ b/extchg.sh @@ -6,38 +6,22 @@ # modified by Tobias Ratschiller to allow any file extension # part of the phpMyAdmin distribution -if [$1 eq ""] +# 2001-07-07, lem9@users.sourceforge.net: +# - supports sub-directories +# - no more bak directory + +if [ $# != 2 ] then - echo "Missing first parameter (extension to be changed)" - echo "Usage: extchg " + echo "Usage: extchg.sh " + echo "" + echo "Example: extchg.sh php3 php" exit fi -if [$2 eq ""] -then - echo "Missing second parameter (extension to change to)" - echo "Usage: extchg " - exit -fi - - -if test ! -s *.$1 -then - echo 'Nothing to convert! Try to copy the script to the directory where you have files to convert.' - exit -fi - - -if test ! -d bak -then - mkdir bak -else - echo 'Directory bak is already there - will try to use it to backup your files...' -fi - -for i in *.$1 +for i in `find . -name "*.$1"` do + echo $i sed -e 's/'$1'/'$2'/g' $i > `ls $i|sed -e 's/'$1'/'$2'/g'` - mv $i bak/$i + rm $i done;