diff options
author | Stu Miller <slackbuilds@go4it2day.com> | 2022-04-06 09:13:48 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-04-09 15:45:47 +0700 |
commit | bbc078dd5d88e346fb40413bcc266e20543332d0 (patch) | |
tree | e55ed4b2754c8c2dc0cf1c2930d0cc7c5cbd3830 /system/slackupdr/doinst.sh | |
parent | 595429eea5e4e0f23503870498d2a3d356657641 (diff) |
system/slackupdr: Added (slackpkg automation).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/slackupdr/doinst.sh')
-rw-r--r-- | system/slackupdr/doinst.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/system/slackupdr/doinst.sh b/system/slackupdr/doinst.sh new file mode 100644 index 0000000000000..d95b935cedc8a --- /dev/null +++ b/system/slackupdr/doinst.sh @@ -0,0 +1,16 @@ +# 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 |