#!/bin/sh
# setupHooks.sh
# Navigate to the .git/hooks directory
cd .git/hooks
# Write the post-commit hook script
cat << 'EOF' > post-commit
#!/bin/sh
# Adjust the path to where your project stores the commitScript.ts
REPO_ROOT=$(git rev-parse --show-toplevel)
bun $REPO_ROOT/scripts/commitScript.ts
EOF
# Make the hook executable
chmod +x post-commit