Commit df584592 authored by Rafaël Carré's avatar Rafaël Carré
Browse files

rename_package: use more osx compatible syntax

add a suffix to -i
put filename as last argument
do not specify -r as we don't use extended regexps
parent 83c77546
...@@ -9,7 +9,7 @@ NEW_NAME=org.videolan.vlc.$1 ...@@ -9,7 +9,7 @@ NEW_NAME=org.videolan.vlc.$1
echo $NEW_NAME $2 echo $NEW_NAME $2
sed -i vlc-android/AndroidManifest.xml -e "s/versionCode\(.*\)0\"/versionCode\1$2\"/" sed -i.orig -e "s/versionCode\(.*\)0\"/versionCode\1$2\"/" vlc-android/AndroidManifest.xml
OLD_PATH=$(echo $OLD_NAME |sed 's/\./\//g') OLD_PATH=$(echo $OLD_NAME |sed 's/\./\//g')
NEW_PATH=$(echo $NEW_NAME |sed 's/\./\//g') NEW_PATH=$(echo $NEW_NAME |sed 's/\./\//g')
...@@ -18,8 +18,8 @@ mv vlc-android/src/${OLD_PATH} vlc-android/src/tmp ...@@ -18,8 +18,8 @@ mv vlc-android/src/${OLD_PATH} vlc-android/src/tmp
mkdir -p vlc-android/src/${OLD_PATH} mkdir -p vlc-android/src/${OLD_PATH}
mv vlc-android/src/tmp vlc-android/src/${NEW_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" find vlc-android \( -name "*.xml" -o -name "*.java" -o -name "*.cfg" -o -name "*.aidl" \) -print0 | xargs -0 sed -i.orig "s/${OLD_NAME}/${NEW_NAME}/g"
find vlc-android \( -name "*.c" \) -print0 | xargs -0 sed -ri "s,${OLD_PATH},${NEW_PATH},g" find vlc-android \( -name "*.c" \) -print0 | xargs -0 sed -i.orig "s,${OLD_PATH},${NEW_PATH},g"
sed -ri "s,${OLD_PATH},${NEW_PATH},g" Makefile sed -i.orig "s,${OLD_PATH},${NEW_PATH},g" Makefile
find vlc-android/jni -type f -print0 | xargs -0 sed -ri "s,$(echo $OLD_NAME |sed 's/\./_/g'),$(echo $NEW_NAME |sed 's/\./_/g'),g" find vlc-android/jni -type f -print0 | xargs -0 sed -i.orig "s,$(echo $OLD_NAME |sed 's/\./_/g'),$(echo $NEW_NAME |sed 's/\./_/g'),g"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment