slackbuilds_ponce/system/mdocml/doinst.sh
LEVAI Daniel 4f176e3053 system/mdocml: Updated for version 1.13.1.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2014-08-30 18:39:17 +07:00

14 lines
375 B
Bash

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/mandoc.conf.new