summaryrefslogtreecommitdiff
path: root/misc/grc/doinst.sh
diff options
context:
space:
mode:
authorEdinaldo P. Silva <edps.mundognu@gmail.com>2017-01-28 23:08:35 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2017-02-04 06:59:27 +0700
commitc2b699753b0b54302791a822751d6c62cf0febed (patch)
treed1fb479c4b2fda626d0a40ddfba464568fb17c23 /misc/grc/doinst.sh
parent336e4c2d0d5c93a96b02a7785a52d80f85ad3a54 (diff)
downloadslackbuilds-c2b699753b0b54302791a822751d6c62cf0febed.tar.gz
misc/grc: Updated for version 1.10.
Signed-off-by: David Spencer <idlemoor@slackbuilds.org>
Diffstat (limited to 'misc/grc/doinst.sh')
-rw-r--r--misc/grc/doinst.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/misc/grc/doinst.sh b/misc/grc/doinst.sh
new file mode 100644
index 0000000000..b8ee3107a8
--- /dev/null
+++ b/misc/grc/doinst.sh
@@ -0,0 +1,17 @@
+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/grc.conf.new
+config etc/grc.bashrc.new
+config etc/grc.zsh.new
+config etc/grc.fish.new