ITR2_ASSET/.scripts/setup-precommit.sh

17 lines
403 B
Bash
Raw Normal View History

2024-11-17 00:37:10 +00:00
#!/bin/sh
# File: /e:/Workspace/Fmodel/Exports/.scripts/setup-precommit.sh
# Create the .git/hooks directory if it doesn't exist
mkdir -p .git/hooks
# Write the pre-commit hook script
cat <<'EOF' >.git/hooks/pre-commit
#!/bin/sh
sh ./.scripts/lfs.sh
EOF
# Make the pre-commit hook script executable
chmod +x .git/hooks/pre-commit
echo "Pre-commit hook has been set up to run 'sh ./.scripts/lfs.sh'"