mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
multimedia/huludesktop: Fixed (Don't clobber config files)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
parent
19c515a3cc
commit
eff6eefd3f
2 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue