Created
June 30, 2009 08:52
-
-
Save oelmekki/138074 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# An example hook script to verify what is about to be committed. | |
# Called by git-commit with no arguments. The hook should | |
# exit with non-zero status after issuing an appropriate message if | |
# it wants to stop the commit. | |
# | |
# To enable this hook, rename this file to "pre-commit". | |
HOOK_PATH=$(dirname $(readlink -f "$0")) | |
tmp="$HOOK_PATH"/../.. | |
APP_PATH=$(readlink -f "$tmp"/.); | |
commit=0 | |
count=$(ack xdebug $APP_PATH --type=php | wc -l) | |
if [[ $count != "0" ]]; then | |
ack xdebug $APP_PATH --type=php | |
commit=1 | |
fi | |
count=$(ack console $APP_PATH --type=js | wc -l) | |
if [[ $count != "0" ]]; then | |
ack console $APP_PATH --type=js | |
commit=1 | |
fi | |
exit $commit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment