12 lines
361 B
Bash
Executable File
12 lines
361 B
Bash
Executable File
#!/bin/sh
|
|
# Installs the repo's tracked git hooks into .git/hooks (git does not sync hooks on clone).
|
|
# Run once after cloning: sh scripts/install-git-hooks.sh
|
|
set -e
|
|
cd "$(git rev-parse --show-toplevel)"
|
|
for hook in scripts/git-hooks/*; do
|
|
name=$(basename "$hook")
|
|
cp "$hook" ".git/hooks/$name"
|
|
chmod +x ".git/hooks/$name"
|
|
echo "installed $name"
|
|
done
|