format.sh: support macports clang-format

macports names it clang-format-mp-N to avoid clashing with a
system-installed one.
pull/1688/head
Jason Rhinelander 3 years ago committed by Jeff Becker
parent 2964051f0d
commit e39c473c88
No known key found for this signature in database
GPG Key ID: F357B3B42F6F9B05

@ -3,6 +3,9 @@
CLANG_FORMAT_DESIRED_VERSION=11
binary=$(which clang-format-$CLANG_FORMAT_DESIRED_VERSION 2>/dev/null)
if [ $? -ne 0 ]; then
binary=$(which clang-format-mp-$CLANG_FORMAT_DESIRED_VERSION 2>/dev/null)
fi
if [ $? -ne 0 ]; then
binary=$(which clang-format 2>/dev/null)
if [ $? -ne 0 ]; then

Loading…
Cancel
Save