Skip to content

Commit 89c0be5

Browse files
committed
Rollup merge of #27374 - dhuseby:fixing_configure_bsd, r=alexcrichton
FreeBSD uses ash, not bash. The double bracket operators [[ and ]] are not supported.
2 parents 5aa7650 + 40eb53c commit 89c0be5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

configure

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1005,11 +1005,9 @@ then
10051005
(''|*clang)
10061006
CFG_CLANG_REPORTED_VERSION=$($CFG_CC --version | grep version)
10071007

1008-
if [[ $CFG_CLANG_REPORTED_VERSION == *"(based on LLVM "* ]]
1009-
then
1008+
if echo $CFG_CLANG_REPORTED_VERSION | grep -q "(based on LLVM "; then
10101009
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*(based on LLVM \(.*\))/\1/')
1011-
elif [[ $CFG_CLANG_REPORTED_VERSION == "Apple LLVM"* ]]
1012-
then
1010+
elif echo $CFG_CLANG_REPORTED_VERSION | grep -q "Apple LLVM"; then
10131011
CFG_OSX_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
10141012
else
10151013
CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')

0 commit comments

Comments
 (0)