14 lines
240 B
Bash
Executable File
14 lines
240 B
Bash
Executable File
#!/bin/bash
|
|
|
|
cd "$(dirname "$0")/pre-commit.d"
|
|
|
|
for hook in *; do
|
|
bash $hook
|
|
RESULT=$?
|
|
if [ $RESULT != 0 ]; then
|
|
echo "pre-commit.d/$hook returned non-zero: $RESULT, abort commit"
|
|
exit $RESULT
|
|
fi
|
|
done
|
|
|
|
exit 0 |