aboutsummaryrefslogtreecommitdiff
path: root/network/nmh/doinst.sh
diff options
context:
space:
mode:
authorJoel J. Adamson <adamsonj@email.unc.edu>2010-05-12 23:32:35 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-12 23:32:35 +0200
commitda1bc7177dad31a279db8c401493d2e44c2448e1 (patch)
tree14172f41c39b28c181c15bd309aa9781f10f7e16 /network/nmh/doinst.sh
parent9db78a86dada35f3de9a68600b3428fee289155c (diff)
downloadslackbuilds-da1bc7177dad31a279db8c401493d2e44c2448e1.tar.xz
network/nmh: Added to 12.2 repository
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 000000000000..19a6ff6ac854
--- /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...
+}
+