summaryrefslogtreecommitdiff
path: root/hooks
diff options
context:
space:
mode:
authorHorus_Arch2015-02-24 18:58:08 +0100
committerHorus_Arch2015-02-24 18:58:08 +0100
commit9e1d8d0fb2b57903b1c6c0c2765b7808655c74a0 (patch)
treea3f8546269eec6edb84fa740bc485c37542498bc /hooks
parent8763022c77f0ad8edf6578962a524715d99e8d39 (diff)
downloadstatuspage-9e1d8d0fb2b57903b1c6c0c2765b7808655c74a0.tar.gz
Struct with flash and error messages to differentiate in template.
Diffstat (limited to 'hooks')
-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