unison/scripts/pre-commit.bash
2019-03-06 16:31:31 -05:00

11 lines
197 B
Bash
Executable File

#!/usr/bin/env bash
echo "Running pre-commit hook from "`pwd`
./scripts/test.sh
# $? stores exit value of the last command
if [ $? -ne 0 ]; then
echo "Tests must pass before commit!"
exit 1
fi