summaryrefslogtreecommitdiff
path: root/academic/sword/doinst.sh
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@liwjatan.at>2010-05-11 22:53:06 +0200
committerDavid Somero <xgizzmo@slackbuilds.org>2010-05-11 22:53:06 +0200
commit5bbe346efb38a7fc36deda7b06767370b1638740 (patch)
tree9f05faea2e9116b5ec9df9f3e62ba0a2495cce1b /academic/sword/doinst.sh
parent90359937f0bcf8459182c81f7d90a5bc992c5482 (diff)
downloadslackbuilds-5bbe346efb38a7fc36deda7b06767370b1638740.tar.gz
academic/sword: Added to 12.1 repository
Diffstat (limited to 'academic/sword/doinst.sh')
-rw-r--r--academic/sword/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/academic/sword/doinst.sh b/academic/sword/doinst.sh
new file mode 100644
index 0000000000..4b522675cc
--- /dev/null
+++ b/academic/sword/doinst.sh
@@ -0,0 +1,15 @@
+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/sword.conf.new
+