summaryrefslogtreecommitdiff
path: root/network/nmh/doinst.sh
diff options
context:
space:
mode:
authorLeonard Schmidt <lems@gmx.net>2014-08-15 23:13:24 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-08-15 23:21:34 +0700
commitb46b72adf941ecf437f720c6ef40df80342aa4e3 (patch)
tree7a7de2675b888add11bbd0091b1e0ad3b4afacc1 /network/nmh/doinst.sh
parentc9fbdbee2b97b94c8ee2059f457208c7dab41ea9 (diff)
downloadslackbuilds-b46b72adf941ecf437f720c6ef40df80342aa4e3.tar.gz
network/nmh: Added (The New Message Handler).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/nmh/doinst.sh')
-rw-r--r--network/nmh/doinst.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/network/nmh/doinst.sh b/network/nmh/doinst.sh
new file mode 100644
index 0000000000..19a6ff6ac8
--- /dev/null
+++ b/network/nmh/doinst.sh
@@ -0,0 +1,13 @@
+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...
+}
+