diff options
author | Britney Fransen <brfransen@gmail.com> | 2013-09-23 19:44:16 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2013-09-23 19:44:16 (GMT) |
commit | 4a1cc56a4d52ed3024aeb1f60c09e135a6ae6446 (patch) | |
tree | 9bbb13e773893d72bd80edd9ba7bf229a710cce3 /abs/core | |
parent | 0328daea42c752673f9268408e7ec96308c5852a (diff) | |
download | linhes_pkgbuild-4a1cc56a4d52ed3024aeb1f60c09e135a6ae6446.zip linhes_pkgbuild-4a1cc56a4d52ed3024aeb1f60c09e135a6ae6446.tar.gz linhes_pkgbuild-4a1cc56a4d52ed3024aeb1f60c09e135a6ae6446.tar.bz2 |
keylaunch: keylaunch.install: check if mythtv home exist before creating symlink
Diffstat (limited to 'abs/core')
-rw-r--r-- | abs/core/keylaunch/PKGBUILD | 2 | ||||
-rw-r--r-- | abs/core/keylaunch/keylaunch.install | 13 |
2 files changed, 9 insertions, 6 deletions
diff --git a/abs/core/keylaunch/PKGBUILD b/abs/core/keylaunch/PKGBUILD index d869044..173cdff 100644 --- a/abs/core/keylaunch/PKGBUILD +++ b/abs/core/keylaunch/PKGBUILD @@ -1,6 +1,6 @@ pkgname=keylaunch pkgver=1.3.9 -pkgrel=7 +pkgrel=8 arch=('i686' 'x86_64') pkgdesc="KeyLaunch is a small utility for binding commands to a hot key. " url="http://www.oroborus.org/" diff --git a/abs/core/keylaunch/keylaunch.install b/abs/core/keylaunch/keylaunch.install index faa176b..87f8fde 100644 --- a/abs/core/keylaunch/keylaunch.install +++ b/abs/core/keylaunch/keylaunch.install @@ -9,13 +9,16 @@ pre_install() { # arg 1: the new package version post_install() { MHOME=`cat /etc/passwd | grep "mythtv" | cut -d":" -f6` - if [ ! -e $MHOME/.keylaunchrc ] + if [ ! -z $MHOME ] then - echo "setting symlink for keylaunch" - ln -s /etc/keylaunchrc $MHOME/.keylaunchrc + if [ ! -e $MHOME/.keylaunchrc ] + then + echo "setting symlink for keylaunch" + ln -s /etc/keylaunchrc $MHOME/.keylaunchrc + fi + echo "updating .keylaunchrc to run mythtv-setup as user" + sed -i 's/key=..*s:sudo\ \/usr\/bin\/mythtv-setup/key=..*s:\/usr\/bin\/mythtv-setup/g' $MHOME/.keylaunchrc fi - echo "updating .keylaunchrc to run mythtv-setup as user" - sed -i 's/key=..*s:sudo\ \/usr\/bin\/mythtv-setup/key=..*s:\/usr\/bin\/mythtv-setup/g' $MHOME/.keylaunchrc } # arg 1: the new package version |