Spaces:
Sleeping
Sleeping
| # 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." | |