From f017f197ccf69ad517281cb1aa934ec9fe414c9f Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 11 Jun 2021 16:32:06 -0400 Subject: [PATCH] Require the correct version in contrib/utilities/indent_common.sh --- contrib/utilities/indent_common.sh | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/contrib/utilities/indent_common.sh b/contrib/utilities/indent_common.sh index f74c39697b..da3144581e 100644 --- a/contrib/utilities/indent_common.sh +++ b/contrib/utilities/indent_common.sh @@ -39,7 +39,7 @@ checks() { # Add the location 'download_clang_format' or 'compile_clang_format' # installs clang-format to the local PATH. - CLANG_FORMAT_PATH="$(cd "$(dirname "$0")" && pwd)/programs/clang-6/bin" + CLANG_FORMAT_PATH="$(cd "$(dirname "$0")" && pwd)/programs/clang-11/bin" export PATH="${CLANG_FORMAT_PATH}:${PATH}" if ! [ -x "$(command -v "${DEAL_II_CLANG_FORMAT}")" ]; then @@ -51,14 +51,13 @@ checks() { exit 1 fi - # Make sure to have the right version. We know that clang-6.0.0 - # and clang-6.0.1 work. Hence, test for clang-6.0. + # Make sure to have the right version. CLANG_FORMAT_VERSION="$(${DEAL_II_CLANG_FORMAT} --version)" CLANG_FORMAT_MAJOR_VERSION=$(echo "${CLANG_FORMAT_VERSION}" | sed 's/^[^0-9]*\([0-9]*\).*$/\1/g') CLANG_FORMAT_MINOR_VERSION=$(echo "${CLANG_FORMAT_VERSION}" | sed 's/^[^0-9]*[0-9]*\.\([0-9]*\).*$/\1/g') - if [ "${CLANG_FORMAT_MAJOR_VERSION}" -ne 11 ] || [ "${CLANG_FORMAT_MINOR_VERSION}" -ne 0 ]; then - echo "*** This indent script requires clang-format version 6.0," + if [ "${CLANG_FORMAT_MAJOR_VERSION}" -ne 11 ] || [ "${CLANG_FORMAT_MINOR_VERSION}" -ne 1 ]; then + echo "*** This indent script requires clang-format version 11.1," echo "*** but version ${CLANG_FORMAT_MAJOR_VERSION}.${CLANG_FORMAT_MINOR_VERSION} was found instead." echo "***" echo "*** You can run the './contrib/utilities/download_clang_format'" -- 2.39.5