audio/TiMidity++: Fixed (Keep perms on rc.* file)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
This commit is contained in:
parent
9ae9ec421e
commit
b9b587d751
|
@ -7,7 +7,7 @@
|
|||
|
||||
PRGNAM="TiMidity++"
|
||||
VERSION="2.13.2"
|
||||
BUILD=${BUILD:-5}
|
||||
BUILD=${BUILD:-6}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
|
|
|
@ -4,12 +4,24 @@ config() {
|
|||
# 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
|
||||
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/timidity.cfg.new
|
||||
config etc/rc.d/rc.timidity.new
|
||||
preserve_perms() {
|
||||
NEW="$1"
|
||||
OLD="$(dirname $NEW)/$(basename $NEW .new)"
|
||||
if [ -e $OLD ]; then
|
||||
cp -a $OLD ${NEW}.incoming
|
||||
cat $NEW > ${NEW}.incoming
|
||||
mv ${NEW}.incoming $NEW
|
||||
fi
|
||||
config $NEW
|
||||
}
|
||||
|
||||
config etc/timidity.cfg.new
|
||||
preserve_perms etc/rc.d/rc.timidity.new
|
||||
|
||||
|
|
Loading…
Reference in New Issue