aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Dunck <jdunck@gmail.com>2011-10-18 10:55:33 -0700
committerBenjamin C Meyer <ben@meyerhome.net>2012-01-25 00:53:15 -0500
commitcf6762c598acc2f3c9b89ad09fb869353760e366 (patch)
tree090def9af4ef435aa8a6f4c952f3d1e688490f61
parenta0dd1a48585246d3d7ee4be8342d3e3763578bdd (diff)
downloadgit-hooks-cf6762c598acc2f3c9b89ad09fb869353760e366.tar.gz
git-hooks-cf6762c598acc2f3c9b89ad09fb869353760e366.tar.bz2
Don't re-install.
Signed-off-by: Benjamin C Meyer <ben@meyerhome.net>
-rwxr-xr-xgit-hooks4
1 files changed, 4 insertions, 0 deletions
diff --git a/git-hooks b/git-hooks
index 40dad0a..fdb7d94 100755
--- a/git-hooks
+++ b/git-hooks
@@ -93,6 +93,10 @@ function install_hooks
fi
cd $GITDIR
if [ "${1}" = "--install" ] ; then
+ if [ -d hooks.old ] ; then
+ echo "hooks.old already exists, perhaps you already installed?"
+ return 1
+ fi
mv hooks hooks.old
mkdir hooks
cd hooks