summaryrefslogtreecommitdiffstats
path: root/scripts/hooks-wrapper.sh
diff options
context:
space:
mode:
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..2730d3394
--- /dev/null
+++ b/scripts/hooks-wrapper.sh
@@ -0,0 +1,12 @@
+#!/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