summaryrefslogtreecommitdiffstats
path: root/misc/pinfo/doinst.sh
diff options
context:
space:
mode:
author Arun Prasannan <polar@arunprasannan.com>2010-05-12 23:31:43 +0200
committer Robby Workman <rworkman@slackbuilds.org>2010-05-12 23:31:43 +0200
commitbacd7e290473905a207eb4fdef15fa83e1a1d92c (patch)
tree7f7835ea7ec88fa994d2ca037eb9114e6f3e0dde /misc/pinfo/doinst.sh
parentb390dfd9ee211d27088e7c1534e49d29b427338b (diff)
downloadslackbuilds-bacd7e290473905a207eb4fdef15fa83e1a1d92c.tar.gz
slackbuilds-bacd7e290473905a207eb4fdef15fa83e1a1d92c.tar.xz
misc/pinfo: Added to 12.2 repository
Diffstat (limited to 'misc/pinfo/doinst.sh')
-rw-r--r--misc/pinfo/doinst.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/misc/pinfo/doinst.sh b/misc/pinfo/doinst.sh
new file mode 100644
index 0000000000..4fce284ce9
--- /dev/null
+++ b/misc/pinfo/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/pinforc.new
+