Guest User

Untitled

a guest
Mar 8th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # An example hook script to verify what is about to be committed.
  4. # Called by git-commit with no arguments. The hook should
  5. # exit with non-zero status after issuing an appropriate message if
  6. # it wants to stop the commit.
  7. #
  8. # To enable this hook, rename this file to "pre-commit".
  9. HOOK_PATH=$(dirname $(readlink -f "$0"))
  10. tmp="$HOOK_PATH"/../..
  11. APP_PATH=$(readlink -f "$tmp"/.);
  12. commit=0
  13.  
  14.  
  15. count=$(ack xdebug $APP_PATH --type=php | wc -l)
  16. if [[ $count != "0" ]]; then
  17. ack xdebug $APP_PATH --type=php
  18. commit=1
  19. fi
  20.  
  21. count=$(ack console $APP_PATH --type=js | wc -l)
  22. if [[ $count != "0" ]]; then
  23. ack console $APP_PATH --type=js
  24. commit=1
  25. fi
  26.  
  27. exit $commit
Add Comment
Please, Sign In to add comment