diff options
author | dsomero <xgizzmo@slackbuilds.org> | 2012-09-29 21:43:21 -0400 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2012-09-30 20:01:04 -0500 |
commit | eff6eefd3fcac99981b669fb6c77ba0b1d66d5d1 (patch) | |
tree | 427d8eee776abff6268d5eed5ccc6666cfb13841 /multimedia/huludesktop | |
parent | 19c515a3cc75a78ec49dc16b0766e7c8894ed993 (diff) |
multimedia/huludesktop: Fixed (Don't clobber config files)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'multimedia/huludesktop')
-rw-r--r-- | multimedia/huludesktop/doinst.sh | 15 | ||||
-rw-r--r-- | multimedia/huludesktop/huludesktop.SlackBuild | 4 |
2 files changed, 18 insertions, 1 deletions
diff --git a/multimedia/huludesktop/doinst.sh b/multimedia/huludesktop/doinst.sh index 3857649f506a8..58d3920186961 100644 --- a/multimedia/huludesktop/doinst.sh +++ b/multimedia/huludesktop/doinst.sh @@ -1,3 +1,18 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/huludesktop/hd_keymap.ini.new + if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications &> /dev/null fi diff --git a/multimedia/huludesktop/huludesktop.SlackBuild b/multimedia/huludesktop/huludesktop.SlackBuild index 555036104e51f..b0777264202a6 100644 --- a/multimedia/huludesktop/huludesktop.SlackBuild +++ b/multimedia/huludesktop/huludesktop.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=huludesktop VERSION=0.9.8 -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} CWD=$(pwd) @@ -56,6 +56,8 @@ mv $PKG/usr/share/doc/huludesktop $PKG/usr/doc/$PRGNAM-$REAL_VER rmdir $PKG/usr/share/doc cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$REAL_VER/$PRGNAM.SlackBuild +mv $PKG/etc/huludesktop/hd_keymap.ini $PKG/etc/huludesktop/hd_keymap.ini.new + mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cat $CWD/doinst.sh > $PKG/install/doinst.sh |