summaryrefslogtreecommitdiff
path: root/network/offlineimap/doinst.sh
diff options
context:
space:
mode:
authorNishant Limbachia <nishant@mnspace.net>2010-05-13 01:00:10 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 01:00:10 +0200
commit34ff4e11c654e7ea05dfd326228d424c0259537c (patch)
tree1cf87b97805427913586b5a85af65dad1cb9b2bd /network/offlineimap/doinst.sh
parent9ddb94b963639802f32319a08933fe355f256e4d (diff)
downloadslackbuilds-34ff4e11c654e7ea05dfd326228d424c0259537c.tar.gz
network/offlineimap: Added to 13.0 repository
Diffstat (limited to 'network/offlineimap/doinst.sh')
-rw-r--r--network/offlineimap/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/network/offlineimap/doinst.sh b/network/offlineimap/doinst.sh
new file mode 100644
index 0000000000..6ede8ff9d5
--- /dev/null
+++ b/network/offlineimap/doinst.sh
@@ -0,0 +1,14 @@
+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/offlineimap.conf.new
+