diff --git a/install-commit-hook b/install-commit-hook new file mode 100755 index 000000000..be6525396 --- /dev/null +++ b/install-commit-hook @@ -0,0 +1,21 @@ +#!/bin/sh + +if [ $# -eq 0 ] + then + echo "Usage: $0 YOUR-MNT" + exit +fi + +BASE="$(realpath "$0")" +BASE="$(dirname "$BASE")" +cd "$BASE" || exit 1 + +cat >> .git/hooks/pre-commit </dev/null | grep -v PASS 1>/dev/null 2>&1 && { echo "Schema validation failed, please check above!" 1>&2; exit 1; } +EOF +chmod +x .git/hooks/pre-commit +