[code-style] enhance clang-format.sh (#2750)

This commit is contained in:
Yakun Xu
2018-05-29 12:20:30 +08:00
committed by Jonathan Hui
parent 94bc7b14f3
commit 131ae9d731
+3 -3
View File
@@ -34,7 +34,9 @@ die() {
exit 1
}
if which clang-format > /dev/null; then
if which clang-format-5.0 > /dev/null; then
alias clang-format=clang-format-5.0
elif which clang-format > /dev/null; then
case "$(clang-format --version)" in
"$CLANG_FORMAT_VERSION"*)
;;
@@ -42,8 +44,6 @@ if which clang-format > /dev/null; then
die "clang-format 5.0 required"
;;
esac
elif which clang-format-5.0 > /dev/null; then
alias clang-format=clang-format-5.0
else
die "clang-format 5.0 required"
fi