guide / scripts /install-hooks.sh
anmol-iisc's picture
UI improvements + specs.md update
0d8c22c
Raw
History Blame Contribute Delete
451 Bytes
#!/usr/bin/env bash
# Install the G.U.I.D.E. git hooks (SPEC.md Β§4). Idempotent β€” run anytime.
set -euo pipefail
ROOT="$(git rev-parse --show-toplevel)"
SRC="$ROOT/scripts/hooks/pre-commit"
DST="$ROOT/.git/hooks/pre-commit"
if [ ! -f "$SRC" ]; then
echo "❌ $SRC not found." >&2
exit 1
fi
cp "$SRC" "$DST"
chmod +x "$DST"
echo "βœ… Installed pre-commit hook β†’ $DST"
echo " It runs tests/test_sanity.py and blocks commits if they fail."