diff options
Diffstat (limited to 'lib/install-hooks')
-rwxr-xr-x | lib/install-hooks | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/install-hooks b/lib/install-hooks new file mode 100755 index 0000000..f4b7aff --- /dev/null +++ b/lib/install-hooks @@ -0,0 +1,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 \ No newline at end of file |