summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-04-21 20:43:52 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-04-21 20:43:52 (GMT)
commit352f6115d475afa8d0246d24ba80ff6e0405aa55 (patch)
tree2237bc7d6b07c0bd33de5cb1400cce5886033e3c
parent427f6b307aa35fc921aa8d8538b8c653219bb065 (diff)
downloadswift-contrib-352f6115d475afa8d0246d24ba80ff6e0405aa55.zip
swift-contrib-352f6115d475afa8d0246d24ba80ff6e0405aa55.tar.bz2
Only install Git hooks if there is a git dir.
-rw-r--r--BuildTools/SCons/SConstruct5
1 files changed, 3 insertions, 2 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index 70f89de..e1e8e24 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -360,8 +360,9 @@ elif env.get("bonjour", False) :
# Set up git hooks
################################################################################
-if not env.GetOption("clean") :
- env.Install("#/.git/hooks", Glob("#/BuildTools/Git/Hooks/*"))
+if env.Dir("#/.git").exists() :
+ if not env.GetOption("clean") :
+ env.Install("#/.git/hooks", Glob("#/BuildTools/Git/Hooks/*"))
################################################################################
# Project files