summary refs log tree commit diff
path: root/lib/install-hooks
blob: f4b7affe0d82cbb4e5cd52b018d2b8c4244b7f62 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env nix-shell
#! nix-shell -i bash --pure
#! nix-shell -p bash git

set -euo pipefail
echo "Reinstalling git hooks"

git_root=$(git rev-parse --show-toplevel) || exit 1
rm -rf $git_root/.git/hooks
ln -s $git_root/lib/hooks $git_root/.git/hooks