From 35a3e6c3b7eb06b2078972a8f9c6b25043f7ea31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Sat, 8 Aug 2015 17:37:05 +0200 Subject: complete tools/rename --- tools/rename | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/tools/rename b/tools/rename index 4617368..c91f64a 100755 --- a/tools/rename +++ b/tools/rename @@ -14,15 +14,27 @@ WHERE="core android desktop ios html build.gradle run" ./gradlew clean +echo "replace '$OLD with $NEW'" for F in $(ack -l $OLD $WHERE); do - sed -i "s/$OLD/$NEW/" $F + sed -i "s/$OLD/$NEW/g" $F done + +echo "replace '$OLD_L' with '$NEW_L'" for F in $(ack -l $OLD_L $WHERE); do - sed -i "s/$OLD_L/$NEW_L/" $F + sed -i "s/$OLD_L/$NEW_L/g" $F +done + +echo "move '$OLD_L' directories into '$NEW_L'" +for D in $(find . -type d -name $OLD_L); do + mv $D ${D%/*}/$NEW_L +done + +echo "move '$OLD.java' files into '$NEW.java'" +for F in $(find . -type f -name $OLD.java); do + mv $F ${F%/*}/$NEW.java done -DIR=$(find . -type d -name $OLD_L) -mv $DIR ${DIR%/*}/$NEW_L +echo "mv core/src/${OLD}.gwt.xml core/src/${NEW}.gwt.xml" +mv core/src/${OLD}.gwt.xml core/src/${NEW}.gwt.xml -FILE=$(find . -type f -name $OLD.java) -mv $FILE ${FILE%/*}/$NEW.java +vim $(find desktop/src/ -name DesktopLauncher.java) -- cgit v1.1-2-g2b99