aboutsummaryrefslogtreecommitdiff
path: root/tools/Linux/kodi.sh.in
diff options
context:
space:
mode:
authorStanisław Gackowski <soeb@soeb.eu>2014-12-07 13:45:27 +0100
committerStanisław Gackowski <soeb@soeb.eu>2014-12-07 13:45:27 +0100
commitc06bef86cef3ec29e9dc53d14058662a3347d228 (patch)
tree6c07a861a1ec2d424842e32ec277594e18137134 /tools/Linux/kodi.sh.in
parentc70182910cff43011e5c4e3feb0507972e5817f1 (diff)
Place link when migrating directory to new location
Diffstat (limited to 'tools/Linux/kodi.sh.in')
-rw-r--r--tools/Linux/kodi.sh.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/Linux/kodi.sh.in b/tools/Linux/kodi.sh.in
index de502aeb7d..b6fc963b7d 100644
--- a/tools/Linux/kodi.sh.in
+++ b/tools/Linux/kodi.sh.in
@@ -50,11 +50,13 @@ migrate_home()
#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
+ mv ${HOME}/.xbmc ${USERDATA_DIR}
+ ln -s $USERDATA_DIR ${HOME}/.xbmc
touch ${USERDATA_DIR}/.kodi_data_was_migrated
elif [ -d "${HOME}/.kodi" ] && [ ! -d "${USERDATA_DIR}" ]; then
echo "INFO: migrating userdata folder. Renaming ${HOME}/.kodi to $USERDATA_DIR"
- mv ${HOME}/.kodi $USERDATA_DIR
+ mv ${HOME}/.kodi ${USERDATA_DIR}
+ ln -s $USERDATA_DIR ${HOME}/.kodi
touch ${USERDATA_DIR}/.kodi_data_was_migrated
fi
}