summaryrefslogtreecommitdiffstats
path: root/python/hgsubversion/doinst.sh
diff options
context:
space:
mode:
author Audrius Kažukauskas <audrius@neutrino.lt>2011-07-20 10:00:41 -0300
committer Robby Workman <rworkman@slackbuilds.org>2011-07-21 22:52:14 -0500
commit397db8da59dd174a69bda4994658d66dbe15412e (patch)
treee806115e56c139efa232323c265b073137ba1d32 /python/hgsubversion/doinst.sh
parent6ebd349fd75a33f5999dec973aa3aad9159d8867 (diff)
downloadslackbuilds-397db8da59dd174a69bda4994658d66dbe15412e.tar.gz
slackbuilds-397db8da59dd174a69bda4994658d66dbe15412e.tar.xz
python/hgsubversion: Added (Mercurial extension for SVN)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'python/hgsubversion/doinst.sh')
-rw-r--r--python/hgsubversion/doinst.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/hgsubversion/doinst.sh b/python/hgsubversion/doinst.sh
new file mode 100644
index 0000000000..ece39be7bf
--- /dev/null
+++ b/python/hgsubversion/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/mercurial/hgrc.d/hgsubversion.rc.new