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

This commit is contained in:
Adriaan de Groot 2020-04-15 11:54:27 +02:00
parent ab5d5fb772
commit 24d0ca6f8e

View file

@ -13,15 +13,16 @@ export LANG LC_ALL LC_NUMERIC
AS=$( which astyle ) 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 do
# Not an error if this particular clang-format isn't found # 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 test -n "$CF" && break
done done
test -n "$AS" || { echo "! No astyle found in PATH"; exit 1 ; } 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 "$AS" || { echo "! $AS is not executable."; exit 1 ; }
test -x "$CF" || { echo "! $CF is not executable."; exit 1 ; } test -x "$CF" || { echo "! $CF is not executable."; exit 1 ; }