diff options
author | Grigorios Bouzakis <grbzks@gmail.com> | 2010-05-12 23:28:38 +0200 |
---|---|---|
committer | David Somero <xgizzmo@slackbuilds.org> | 2010-05-12 23:28:38 +0200 |
commit | 6a9d6f0f7a33d5ece9ac74453f5d2f986c4253c8 (patch) | |
tree | fa5f0a6f635d7bb392133b80414083819b7388be /development/colordiff/doinst.sh | |
parent | 93bdcb139c82a1e94c521360cb240109268767c9 (diff) | |
download | slackbuilds-6a9d6f0f7a33d5ece9ac74453f5d2f986c4253c8.tar.gz |
development/colordiff: Added to 12.2 repository
Diffstat (limited to 'development/colordiff/doinst.sh')
-rw-r--r-- | development/colordiff/doinst.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/development/colordiff/doinst.sh b/development/colordiff/doinst.sh new file mode 100644 index 0000000000..704751bd12 --- /dev/null +++ b/development/colordiff/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/colordiffrc.new + |