diff options
author | dsomero <xgizzmo@slackbuilds.org> | 2012-09-27 20:12:53 -0400 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2012-09-29 17:17:36 -0500 |
commit | b9b587d751bcfb5fd2c5697a3d0e70164612a324 (patch) | |
tree | ae108dcccb67aab12751971a26208356f38309a1 | |
parent | 9ae9ec421e0c03201c382803dfbaa73fef0dcfed (diff) |
audio/TiMidity++: Fixed (Keep perms on rc.* file)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
-rw-r--r-- | audio/TiMidity++/TiMidity++.SlackBuild | 2 | ||||
-rw-r--r-- | audio/TiMidity++/doinst.sh | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/audio/TiMidity++/TiMidity++.SlackBuild b/audio/TiMidity++/TiMidity++.SlackBuild index e8a00e44740f4..6d3249a205aa0 100644 --- a/audio/TiMidity++/TiMidity++.SlackBuild +++ b/audio/TiMidity++/TiMidity++.SlackBuild @@ -7,7 +7,7 @@ PRGNAM="TiMidity++" VERSION="2.13.2" -BUILD=${BUILD:-5} +BUILD=${BUILD:-6} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then diff --git a/audio/TiMidity++/doinst.sh b/audio/TiMidity++/doinst.sh index 359c5a3f8b9c6..56700cc0ff3ec 100644 --- a/audio/TiMidity++/doinst.sh +++ b/audio/TiMidity++/doinst.sh @@ -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... } +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 -config etc/rc.d/rc.timidity.new +preserve_perms etc/rc.d/rc.timidity.new |