blob: e40f735cf0aa5236d670546ef94d152a154008df (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
APP_NAME=@APP_NAME@
XBMC_HOME="/var/mobile/Library/Preferences/XBMC"
APP_HOME="/var/mobile/Library/Preferences/@APP_NAME@"
function needs_kodi_migration () {
#check if there is an old XBMC folder to migrate
if test -d "$XBMC_HOME" && test ! -d "$APP_HOME"
then
return "1";
else
return "0";
fi
}
function migrate_to_kodi () {
echo "moving settings from $XBMC_HOME to $APP_HOME"
mv $XBMC_HOME $APP_HOME
chown -R mobile.mobile $APP_HOME
echo "Migration complete"
}
needs_kodi_migration
NEEDS_MIGRATION=$?
if [ "$NEEDS_MIGRATION" == "1" ]
then
echo "This is the first time you install @APP_NAME@ and we detected that you have an old XBMC configuration. Your XBMC configuration will now be migrated to @APP_NAME@ by moving the settings folder. If you ever want to go back to XBMC please backup /var/mobile/Library/Preferences/@APP_NAME@ after this installation has finished and rename it to XBMC in case you downgrade to XBMC."
migrate_to_kodi
fi
|