summaryrefslogtreecommitdiffstats
path: root/tools/rename
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2015-08-08 17:37:05 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2015-08-08 17:37:05 +0200
commit35a3e6c3b7eb06b2078972a8f9c6b25043f7ea31 (patch)
tree1e3807fb26218fed9cc450c89c3f15fa20fcb025 /tools/rename
parent9a2bec1e5bbd7095f8de1c7c1357c6faeecbb454 (diff)
downloadRustAndDust-35a3e6c3b7eb06b2078972a8f9c6b25043f7ea31.zip
RustAndDust-35a3e6c3b7eb06b2078972a8f9c6b25043f7ea31.tar.gz
complete tools/rename
Diffstat (limited to 'tools/rename')
-rwxr-xr-xtools/rename24
1 files 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)