2 set -o nounset # Treat unset variables as an error and immediately exit
3 set -o errexit # If a command fails exit the whole script
5 if [ "${DEBUG:-false}" = "true" ]; then
6 set -x # Run the entire script in debug mode
9 if ! command -v pre-commit >/dev/null 2>&1; then
10 echo "pre-commit not found: please install or check your PATH" >&2
11 echo "See https://pre-commit.com/#installation" >&2
15 pre-commit install --install-hooks
16 pre-commit install --hook-type commit-msg --install-hooks