Guest User

Untitled

a guest
Sep 26th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment