aboutsummaryrefslogtreecommitdiff
path: root/tools/Linux/kodi.sh.in
diff options
context:
space:
mode:
authorwsnipex <wsnipex@a1.net>2018-09-20 10:27:32 +0200
committerwsnipex <wsnipex@a1.net>2018-09-21 15:22:40 +0200
commitadad4d90226f82cf2ff708eec83a93f02e8226e9 (patch)
tree5a770ca3d23517e7c164be4f9b934592288fc8f1 /tools/Linux/kodi.sh.in
parent6deac11f73f1003d9d0a056117b6a90ecde2bdd0 (diff)
[linux] allow overriding our userdata dir
Diffstat (limited to 'tools/Linux/kodi.sh.in')
-rw-r--r--tools/Linux/kodi.sh.in14
1 files changed, 7 insertions, 7 deletions
diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in
index 5e5360c96f..b8425b7cce 100644
--- a/tools/Linux/kodi.sh.in
+++ b/tools/Linux/kodi.sh.in
@@ -27,7 +27,7 @@ datarootdir="@datarootdir@"
LIBDIR="@libdir@"
APP_BINARY=$LIBDIR/${bin_name}/@APP_BINARY@
CRASHLOG_DIR=${CRASHLOG_DIR:-$HOME}
-USERDATA_DIR="${HOME}/.${bin_name}"
+KODI_DATA=${KODI_DATA:-"${HOME}/.${bin_name}"} # mapped to special://home/
WINDOWING=${WINDOWING:-"auto"}
# Workaround for high CPU load with nvidia GFX
@@ -88,10 +88,10 @@ migrate_home()
[ "$(basename $0)" = "xbmc" ] && echo "WARNING: Running ${bin_name} as "xbmc" is deprecated and will be removed in later versions, please switch to using the ${bin_name} binary"
#check if data migration is needed
- if [ -d "${HOME}/.xbmc" ] && [ ! -d "${USERDATA_DIR}" ]; then
- echo "INFO: migrating userdata folder. Renaming ${HOME}/.xbmc to $USERDATA_DIR"
- mv ${HOME}/.xbmc $USERDATA_DIR
- touch ${USERDATA_DIR}/.kodi_data_was_migrated
+ if [ -d "${HOME}/.xbmc" ] && [ ! -d "${KODI_DATA}" ]; then
+ echo "INFO: migrating userdata folder. Renaming ${HOME}/.xbmc to $KODI_DATA"
+ mv ${HOME}/.xbmc $KODI_DATA
+ touch ${KODI_DATA}/.kodi_data_was_migrated
fi
}
@@ -166,9 +166,9 @@ print_crash_report()
echo >> $FILE
echo "################# LOG FILE ##################" >> $FILE
echo >> $FILE
- if [ -f $USERDATA_DIR/temp/@APP_NAME_LC@.log ]
+ if [ -f $KODI_DATA/temp/@APP_NAME_LC@.log ]
then
- cat $USERDATA_DIR/temp/@APP_NAME_LC@.log >> $FILE
+ cat $KODI_DATA/temp/@APP_NAME_LC@.log >> $FILE
echo >> $FILE
else
echo "Logfile not found in the usual place." >> $FILE