3 # Copyright (C) The Arvados Authors. All rights reserved.
5 # SPDX-License-Identifier: Apache-2.0
7 set -o nounset # Treat unset variables as an error and immediately exit
8 set -o errexit # If a command fails exit the whole script
10 if [ "${DEBUG:-false}" = "true" ]; then
11 set -x # Run the entire script in debug mode
14 if ! command -v pre-commit >/dev/null 2>&1; then
15 echo "pre-commit not found: please install or check your PATH" >&2
16 echo "See https://pre-commit.com/#installation" >&2
20 pre-commit install --install-hooks
21 pre-commit install --hook-type commit-msg --install-hooks