#!/usr/bin/env bash
# Commit message validation hook.
# Delegates to scripts/validate_commit.py to enforce the commit grammar.
set -euo pipefail
if python --version >/dev/null 2>&1; then PYTHON=python;
elif python3 --version >/dev/null 2>&1; then PYTHON=python3;
else echo "No Python found, skipping commit validation"; exit 0; fi
exec $PYTHON scripts/validate_commit.py "$1"
