#!/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 make clean || exit 0 else echo "No Makefile found." 1>&2 exit 1 fi