rename_package.sh 715 Bytes
Newer Older
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
1
2
3
#! /bin/sh

OLD_NAME=org.videolan.vlc
4
NEW_NAME=org.videolan.vlc.$1
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
5

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
6
7
OLD_PATH=$(echo $OLD_NAME |sed 's/\./\//g')
NEW_PATH=$(echo $NEW_NAME |sed 's/\./\//g')
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
8

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
9
10
11
12
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}

13
14
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 "*.c" \) -print0 | xargs -0 sed -ri "s,${OLD_PATH},${NEW_PATH},g"
15
sed -ri "s,${OLD_PATH},${NEW_PATH},g" Makefile
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
16

17
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"