aboutsummaryrefslogtreecommitdiffstats
path: root/git-tools/hooks/install
diff options
context:
space:
mode:
Diffstat (limited to 'git-tools/hooks/install')
-rwxr-xr-xgit-tools/hooks/install17
1 files changed, 17 insertions, 0 deletions
diff --git a/git-tools/hooks/install b/git-tools/hooks/install
new file mode 100755
index 0000000000..a42c55a769
--- /dev/null
+++ b/git-tools/hooks/install
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Script to install the git hooks
+# by symlinking them into the .git/hooks directory
+#
+# Usage (from within git-tools/hooks):
+# ./install
+
+dir=$(dirname $0)
+
+for file in $(ls $dir)
+do
+ if [ $file != "install" ] && [ $file != "uninstall" ]
+ then
+ ln -s "../../git-tools/hooks/$file" "$dir/../../.git/hooks/$file"
+ fi
+done