aboutsummaryrefslogtreecommitdiff
path: root/misc/Publican/doinst.sh
diff options
context:
space:
mode:
authorNikos Giotis <nikos.giotis@gmail.com>2018-02-12 11:13:04 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-02-17 07:42:54 +0700
commit35ac55945d62be5b3e3e086826e2b3a023702e66 (patch)
treea2d9f20d77f15d5914b6e38bd5b739a9bd1f4578 /misc/Publican/doinst.sh
parent0475d55c77de2d9ed3d388a53804f7f20075fcd3 (diff)
downloadslackbuilds-35ac55945d62be5b3e3e086826e2b3a023702e66.tar.xz
misc/Publican: Added (Tool for publishing DocBook XML).
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'misc/Publican/doinst.sh')
-rw-r--r--misc/Publican/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/misc/Publican/doinst.sh b/misc/Publican/doinst.sh
new file mode 100644
index 000000000000..c899c943f9be
--- /dev/null
+++ b/misc/Publican/doinst.sh
@@ -0,0 +1,14 @@
+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/publican-website.cfg.new