github.com/hashgraph/hedera-sdk-go/v2@v2.48.0/scripts/install-hooks.sh (about) 1 #!/bin/bash 2 # source 3 HOOKS_DIR="$(dirname "$0")/git-hooks" 4 5 # target 6 GIT_HOOKS_DIR="$(git rev-parse --show-toplevel)/.git/hooks" 7 8 # Copy hooks to the .git/hooks directory 9 for hook in "$HOOKS_DIR"/*; do 10 echo "Installing $(basename "$hook") hook..." 11 cp "$hook" "$GIT_HOOKS_DIR/$(basename "$hook")" 12 chmod +x "$GIT_HOOKS_DIR/$(basename "$hook")" 13 done 14 15 echo "Git hooks have been set up."