[xbmc-rebrand] xbmc: add service script to rename XBMC's config dir

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2014-10-20 16:03:53 +02:00
parent d56e637a10
commit 313f10e6f8
3 changed files with 44 additions and 0 deletions

View File

@ -421,6 +421,8 @@ post_makeinstall_target() {
cp $PKG_DIR/scripts/kodi-config $INSTALL/usr/lib/kodi
cp $PKG_DIR/scripts/kodi-hacks $INSTALL/usr/lib/kodi
cp $PKG_DIR/scripts/kodi-sources $INSTALL/usr/lib/kodi
# TODO: remove this later:
cp $PKG_DIR/scripts/kodi-rebrand $INSTALL/usr/lib/kodi
mkdir -p $INSTALL/usr/lib/openelec
cp $PKG_DIR/scripts/systemd-addon-wrapper $INSTALL/usr/lib/openelec
@ -506,4 +508,7 @@ post_install() {
enable_service kodi-waitonnetwork.service
enable_service kodi.service
enable_service kodi-lirc-suspend.service
# TODO: remove this later
enable_service kodi-rebrand.service
}

View File

@ -0,0 +1,26 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
# move XBMC configdir to Kodi configdir
# TODO: remove the .xbmc symlink later
if [ -d /storage/.xbmc -a ! -d /storage/.kodi ]; then
mv /storage/.xbmc /storage/.kodi
ln -sf .kodi /storage/.xbmc
fi

View File

@ -0,0 +1,13 @@
[Unit]
Description=Kodi config dir rebrand
DefaultDependencies=no
Before=local-fs.target shutdown.target
Conflicts=shutdown.target
[Service]
Type=oneshot
ExecStart=/usr/lib/kodi/kodi-rebrand
RemainAfterExit=yes
[Install]
WantedBy=local-fs.target