aboutsummaryrefslogtreecommitdiff
path: root/system/autoslackpkg/doinst.sh
diff options
context:
space:
mode:
authorStu Miller <slackbuilds@go4it2day.com>2020-02-08 08:42:01 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-02-08 13:39:21 +0700
commit64bca85513fded2398f197ffa572da92bf817a37 (patch)
treeb094cffeaf89f5524c9ba17abfd00753c2d61a01 /system/autoslackpkg/doinst.sh
parent037af6a4730c80225b701c5c23543ba088766877 (diff)
system/autoslackpkg: Added (automates the use of slackpkg).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'system/autoslackpkg/doinst.sh')
-rw-r--r--system/autoslackpkg/doinst.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/system/autoslackpkg/doinst.sh b/system/autoslackpkg/doinst.sh
new file mode 100644
index 0000000000000..fbcc100866bdb
--- /dev/null
+++ b/system/autoslackpkg/doinst.sh
@@ -0,0 +1,16 @@
+# 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