SlackBuildsOrg/system/heirloom-doctools/doinst.sh
Ruben Schuller 32b6aa68a4 system/heirloom-doctools: Updated for version 141217.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2014-12-19 13:03:08 +07:00

15 lines
423 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/profile.d/heirloom.sh.new
config etc/profile.d/heirloom.csh.new