From 9e1d8d0fb2b57903b1c6c0c2765b7808655c74a0 Mon Sep 17 00:00:00 2001 From: Horus_Arch Date: Tue, 24 Feb 2015 18:58:08 +0100 Subject: Struct with flash and error messages to differentiate in template. --- hooks/pre-commit | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'hooks/pre-commit') 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 -- cgit v1.2.3