|
|
|
@ -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 ; }
|
|
|
|
|
|
|
|
|
|