slackbuilds_ponce/system/autoslackpkg/doinst.sh
Stu Miller 64bca85513
system/autoslackpkg: Added (automates the use of slackpkg).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2020-02-08 13:39:21 +07:00

16 lines
420 B
Bash

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