rename_package.sh 492 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
13
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"
14
sed -ri "s,${OLD_PATH},${NEW_PATH},g" Makefile
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
15