From bacd7e290473905a207eb4fdef15fa83e1a1d92c Mon Sep 17 00:00:00 2001 From: Arun Prasannan Date: Wed, 12 May 2010 23:31:43 +0200 Subject: misc/pinfo: Added to 12.2 repository --- misc/pinfo/doinst.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 misc/pinfo/doinst.sh (limited to 'misc/pinfo/doinst.sh') 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 + -- cgit v1.2.3