]> code.delx.au - pulseaudio/commitdiff
git: activate default commit hook
authorLennart Poettering <lennart@poettering.net>
Mon, 11 May 2009 19:18:32 +0000 (21:18 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 11 May 2009 19:18:32 +0000 (21:18 +0200)
bootstrap.sh

index cb74121e45261755a33f12a34868fa5fbaa48e5f..c7737a6eddc0dd1d273a838d56ae443a1d2532b9 100755 (executable)
@@ -40,6 +40,12 @@ run_versioned() {
 
 set -ex
 
+if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
+    echo "Activating pre-commit hook."
+    cp -av .git/hooks/pre-commit.sample .git/hooks/pre-commit
+    chmod -c +x  .git/hooks/pre-commit
+fi
+
 # We check for this here, because if pkg-config is not found in the
 # system, it's likely that the pkg.m4 macro file is also not present,
 # which will make PKG_PROG_PKG_CONFIG be undefined and the generated