slackbuilds_ponce/system/slackupdr/doinst.sh
Stu Miller bbc078dd5d
system/slackupdr: Added (slackpkg automation).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2022-04-09 15:45:47 +07:00

16 lines
414 B
Bash

# doinst.sh for slackupdr
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/slackpkg/slackupdr.conf.new