Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

localinfra: add script to install git hooks

Signed-off-by: Spenser Black <me@spenser.black>

Spenser Black (Jul 12, 2026, 1:46 PM EDT) 705c2d08 f35d05fe

+20
+6
localinfra/scripts/git-hooks/readme.md
··· 1 + # Git Hooks 2 + 3 + This directory contains Git Hooks to validate contributions. You can install these hooks by 4 + calling [`install-git-hooks.sh`](../install-git-hooks.sh). 5 + 6 + See [the documentation for Git Hooks](https://git-scm.com/docs/githooks) for more information.
+14
localinfra/scripts/install-git-hooks.sh
··· 1 + #!/bin/sh 2 + script_dir="$(dirname "$(readlink -f "$0")")" 3 + git_dir="$(git rev-parse --git-dir)" 4 + 5 + for hook in "$script_dir"/git-hooks/*; do 6 + hook_base="$(basename "$hook")" 7 + if [ "$hook_base" = "readme.md" ]; then 8 + continue 9 + fi 10 + hook_name="${hook_base%.*}" 11 + hook_path="$git_dir/hooks/$hook_name" 12 + echo "Installing '$hook' to '$hook_path'" 13 + ln -s "$hook" "$hook_path" 14 + done