While checking that the controller is up, we don't care about
[arvados-formula.git] / bin / install-hooks
1 #!/usr/bin/env sh
2
3 # Copyright (C) The Arvados Authors. All rights reserved.
4 #
5 # SPDX-License-Identifier: Apache-2.0
6
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
9
10 if [ "${DEBUG:-false}" = "true" ]; then
11   set -x # Run the entire script in debug mode
12 fi
13
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
17   exit 1
18 fi
19
20 pre-commit install --install-hooks
21 pre-commit install --hook-type commit-msg --install-hooks