mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-08 13:23:51 +00:00
25 lines
845 B
Bash
Executable File
25 lines
845 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
# file Copyright.txt or https://cmake.org/licensing for details.
|
|
|
|
die() {
|
|
echo 'pre-commit hook failure' 1>&2
|
|
echo '-----------------------' 1>&2
|
|
echo '' 1>&2
|
|
echo "$@" 1>&2
|
|
exit 1
|
|
}
|
|
|
|
#-----------------------------------------------------------------------------
|
|
|
|
# Check that development setup is up-to-date.
|
|
lastSetupForDevelopment=$(git config --get hooks.SetupForDevelopment || echo 0)
|
|
eval $(grep '^SetupForDevelopment_VERSION=' "${BASH_SOURCE%/*}/../SetupForDevelopment.sh")
|
|
test -n "$SetupForDevelopment_VERSION" || SetupForDevelopment_VERSION=0
|
|
if test $lastSetupForDevelopment -lt $SetupForDevelopment_VERSION; then
|
|
die 'Developer setup in this work tree is out of date. Please re-run
|
|
|
|
Utilities/SetupForDevelopment.sh
|
|
'
|
|
fi
|