docker-claude/hooks/pre-commit

14 lines
298 B
Text
Raw Normal View History

#!/usr/bin/env bash
# Ensure control scripts stay executable.
set -euo pipefail
SCRIPTS=(claude.sh build.sh)
for f in "${SCRIPTS[@]}"; do
if [[ -f "$f" && ! -x "$f" ]]; then
echo "pre-commit: fixing missing executable bit on $f"
chmod +x "$f"
git add "$f"
fi
done