diff options
author | Audrius Kažukauskas <audrius@neutrino.lt> | 2011-07-03 13:54:58 -0400 |
---|---|---|
committer | Niels Horn <niels.horn@slackbuilds.org> | 2011-07-14 21:54:02 -0300 |
commit | 6aad810e26d431cda35d53ae27e8735607fbe3e4 (patch) | |
tree | 9571ca98737fcef3ce1cbba5ea37ceebf6b37a41 /python/hg-git/doinst.sh | |
parent | 764dcb92d1b2878de7254ddff36dac39119548e6 (diff) |
python/hg-git: Added (Mercurial to Git extension)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'python/hg-git/doinst.sh')
-rw-r--r-- | python/hg-git/doinst.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/python/hg-git/doinst.sh b/python/hg-git/doinst.sh new file mode 100644 index 0000000000000..a23ea45833242 --- /dev/null +++ b/python/hg-git/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/hggit.rc.new |