[Android] Fix rename script

Jean-Baptiste Kempf git at videolan.org
Sat Jun 23 19:12:07 CEST 2012


android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat Jun 23 19:10:35 2012 +0200| [92522d4e9d35360e0cac0c9b66430ab7069a89f4] | committer: Jean-Baptiste Kempf

Fix rename script

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=92522d4e9d35360e0cac0c9b66430ab7069a89f4
---

 rename_package.sh |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/rename_package.sh b/rename_package.sh
index 6ec947f..7562839 100644
--- a/rename_package.sh
+++ b/rename_package.sh
@@ -3,9 +3,12 @@
 OLD_NAME=org.videolan.vlc
 NEW_NAME=org.videolan.vlc.beta_v7neon
 
-OLD_PATH=org/videolan/vlc/
-NEW_PATH=org/videolan/vlc_beta_v7neon/
+OLD_PATH=$(echo $OLD_NAME |sed 's/\./\//g')
+NEW_PATH=$(echo $NEW_NAME |sed 's/\./\//g')
 
-mv vlc-android/src/${OLD_PATH} vlc-android/src/${NEW_PATH}
-find vlc-android \( -name "*.xml" -o -name "*.java" -o -name "*.cfg" -o -name "*.aidl" \) -print0 | xargs -0 sed -ri "s/${OLD_PATH}/${NEW_PATH}/g'
+mv vlc-android/src/${OLD_PATH} vlc-android/src/tmp
+mkdir -p vlc-android/src/${OLD_PATH}
+mv vlc-android/src/tmp vlc-android/src/${NEW_PATH}
+
+find vlc-android \( -name "*.xml" -o -name "*.java" -o -name "*.cfg" -o -name "*.aidl" \) -print0 | xargs -0 sed -ri "s/${OLD_NAME}/${NEW_NAME}/g"
 



More information about the Android mailing list