CI: don't be so chatty while looking for clang-format

main
Adriaan de Groot 5 years ago
parent ab5d5fb772
commit 24d0ca6f8e

@ -13,15 +13,16 @@ export LANG LC_ALL LC_NUMERIC
AS=$( which astyle )
for _cf in clang-format-7 clang-format-8 clang-format70 clang-format80 clang-format
CF_VERSIONS="clang-format-7 clang-format-8 clang-format70 clang-format80 clang-format"
for _cf in $CF_VERSIONS
do
# Not an error if this particular clang-format isn't found
CF=$( which $_cf || true )
CF=$( which $_cf 2> /dev/null || true )
test -n "$CF" && break
done
test -n "$AS" || { echo "! No astyle found in PATH"; exit 1 ; }
test -n "$CF" || { echo "! No clang-format-7 found in PATH"; exit 1 ; }
test -n "$CF" || { echo "! No clang-format ($CF_VERSIONS) found in PATH"; exit 1 ; }
test -x "$AS" || { echo "! $AS is not executable."; exit 1 ; }
test -x "$CF" || { echo "! $CF is not executable."; exit 1 ; }

Loading…
Cancel
Save