summaryrefslogtreecommitdiff
path: root/audio/audtty/doinst.sh
diff options
context:
space:
mode:
authordsomero <xgizzmo@slackbuilds.org>2012-09-27 20:26:22 -0400
committerRobby Workman <rworkman@slackbuilds.org>2012-09-29 17:17:37 -0500
commit59d3e1f8f80b923605363336500ffd1d51278e54 (patch)
tree6be4d1e764181806a4ce559eae1de4d00e1d026f /audio/audtty/doinst.sh
parentb9b587d751bcfb5fd2c5697a3d0e70164612a324 (diff)
downloadslackbuilds-59d3e1f8f80b923605363336500ffd1d51278e54.tar.gz
audio/audtty: Fixed (Don't clobber config file)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'audio/audtty/doinst.sh')
-rw-r--r--audio/audtty/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/audio/audtty/doinst.sh b/audio/audtty/doinst.sh
new file mode 100644
index 0000000000..fcf851475a
--- /dev/null
+++ b/audio/audtty/doinst.sh
@@ -0,0 +1,14 @@
+ 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/audtty.conf.new \ No newline at end of file