Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/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
Add Comment
Please, Sign In to add comment