summaryrefslogtreecommitdiffstats
path: root/scripts/hooks-wrapper.sh
diff options
context:
space:
mode:
authorJoakim Reinert <mail@jreinert.com>2015-05-04 19:15:00 +0200
committerFlorian Pritz <bluewind@xinu.at>2015-05-05 12:21:27 +0200
commit8ec8aa2ad859b2e8586da299400477c243ecc4f2 (patch)
tree25430b423a92b936562a6e9fc89250fca0293a62 /scripts/hooks-wrapper.sh
parente9f7b053141043e683a549783eea634072051a69 (diff)
Add install script for git hooks
Diffstat (limited to 'scripts/hooks-wrapper.sh')
-rwxr-xr-xscripts/hooks-wrapper.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/hooks-wrapper.sh b/scripts/hooks-wrapper.sh
new file mode 100755
index 000000000..e89a3567d
--- /dev/null
+++ b/scripts/hooks-wrapper.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/bash
+if [ -x $0.local ]; then
+ $0.local "$@" || exit $?
+fi
+
+basename=$(basename "$0")
+hooks_dir="$GIT_DIR/../git-hooks"
+hook="$hooks_dir/$basename"
+
+if [ -x "$hook" ]; then
+ "$hook" "$@" || exit $?
+fi