summaryrefslogtreecommitdiff
path: root/hooks/pre-commit
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/pre-commit')
-rwxr-xr-xhooks/pre-commit6
1 files changed, 6 insertions, 0 deletions
diff --git a/hooks/pre-commit b/hooks/pre-commit
index 5a3ff7d..b88d7cd 100755
--- a/hooks/pre-commit
+++ b/hooks/pre-commit
@@ -1,5 +1,11 @@
#!/bin/bash
+if [ -z $GIT_DIR ]; then
+ echo "Don't run this script from the command line."
+ echo "Move this file or set a symbolic link to \".git/hooks/pre-commit\"."
+ exit 1
+fi
+
if [ -f $GIT_DIR/../app/Makefile ]; then
cd "$GIT_DIR/../app"
make test