Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # Executes multiple scripts on a git event
- #
- # Expects scripts to be arranged like:
- # some/directory/for/hooks/
- # pre-commit/
- # safe-debug.sh
- # validate.sh
- # update/
- # email.sh
- #
- # So for the update hook, we'd set HOOK_DIR as
- #
- # HOOK_DIR="some/directory/for/hooks/"
- #
- # and save the file as ".git/hooks/update"
- #
- # Edit this line
- HOOK_DIR="tools/hooks/"
- # Don't edit these
- hook=`basename $0`
- dir=$HOOK_DIR$hook
- if [ -d $dir ]; then
- echo "Executing "$hook" hooks";
- find $dir -name '*.sh' -exec {} \;
- fi
Add Comment
Please, Sign In to add comment