From 5492701b329e844d1b9097c97bc8afdd9cd72c97 Mon Sep 17 00:00:00 2001 From: Rory& Date: Wed, 3 Jul 2024 01:31:00 +0200 Subject: Add dotfiles, portable changes --- lib/install-hooks | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 lib/install-hooks (limited to 'lib/install-hooks') 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 -- cgit 1.5.1