daily pastebin goal
68%
SHARE
TWEET

Untitled

a guest Mar 8th, 2018 38 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top