|
@@ -78,8 +78,8 @@ test "$#" = 0 || die "$usage"
|
|
|
|
|
|
|
|
# Find a default tool.
|
|
# Find a default tool.
|
|
|
tools='
|
|
tools='
|
|
|
- clang-format
|
|
|
|
|
clang-format-3.8
|
|
clang-format-3.8
|
|
|
|
|
+ clang-format
|
|
|
'
|
|
'
|
|
|
if test "x$clang_format" = "x"; then
|
|
if test "x$clang_format" = "x"; then
|
|
|
for tool in $tools; do
|
|
for tool in $tools; do
|
|
@@ -96,6 +96,11 @@ if ! type -p "$clang_format" >/dev/null; then
|
|
|
exit 1
|
|
exit 1
|
|
|
fi
|
|
fi
|
|
|
|
|
|
|
|
|
|
+if ! "$clang_format" --version | grep 'clang-format version 3\.8' >/dev/null 2>/dev/null; then
|
|
|
|
|
+ echo "clang-format version 3.8 is required (exactly)"
|
|
|
|
|
+ exit 1
|
|
|
|
|
+fi
|
|
|
|
|
+
|
|
|
# Select listing mode.
|
|
# Select listing mode.
|
|
|
case "$mode" in
|
|
case "$mode" in
|
|
|
'') echo "$usage"; exit 0 ;;
|
|
'') echo "$usage"; exit 0 ;;
|