Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Sep 26th, 2018 62 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. #!/bin/sh
  2. #
  3. # Executes multiple scripts on a git event
  4. #
  5. # Expects scripts to be arranged like:
  6. # some/directory/for/hooks/
  7. #     pre-commit/
  8. #         safe-debug.sh
  9. #         validate.sh
  10. #     update/
  11. #         email.sh
  12. #
  13. # So for the update hook, we'd set HOOK_DIR as
  14. #
  15. # HOOK_DIR="some/directory/for/hooks/"
  16. #
  17. # and save the file as ".git/hooks/update"
  18. #
  19.  
  20. # Edit this line
  21.  
  22. HOOK_DIR="tools/hooks/"
  23.  
  24. # Don't edit these
  25. hook=`basename $0`
  26. dir=$HOOK_DIR$hook
  27.  
  28. if [ -d $dir ]; then
  29.     echo "Executing "$hook" hooks";
  30.     find $dir -name '*.sh' -exec {} \;
  31. fi
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