about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSteve Klabnik <steve@steveklabnik.com>2015-07-29 10:30:36 -0400
committerSteve Klabnik <steve@steveklabnik.com>2015-07-29 10:30:36 -0400
commit89c0be547e1c381317db56982757704ea597967a (patch)
tree48c66186e4c08822201c360a74c6ad0fcba166dd
parent5aa76509da4b45248ef1a1dcb74939de9bb08c1a (diff)
parent40eb53c409b7a6cd49e092e99c35bb8625767644 (diff)
downloadrust-89c0be547e1c381317db56982757704ea597967a.tar.gz
rust-89c0be547e1c381317db56982757704ea597967a.zip
Rollup merge of #27374 - dhuseby:fixing_configure_bsd, r=alexcrichton
FreeBSD uses ash, not bash.  The double bracket operators [[ and ]] are not supported.
-rwxr-xr-xconfigure6
1 files changed, 2 insertions, 4 deletions
diff --git a/configure b/configure
index cf349af6488..2c8d78598b2 100755
--- a/configure
+++ b/configure
@@ -1005,11 +1005,9 @@ then
         (''|*clang)
         CFG_CLANG_REPORTED_VERSION=$($CFG_CC --version | grep version)
 
-        if [[ $CFG_CLANG_REPORTED_VERSION == *"(based on LLVM "* ]]
-        then
+        if echo $CFG_CLANG_REPORTED_VERSION | grep -q "(based on LLVM "; then
             CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*(based on LLVM \(.*\))/\1/')
-        elif [[ $CFG_CLANG_REPORTED_VERSION == "Apple LLVM"* ]]
-        then
+        elif echo $CFG_CLANG_REPORTED_VERSION | grep -q "Apple LLVM"; then
             CFG_OSX_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')
         else
             CFG_CLANG_VERSION=$(echo $CFG_CLANG_REPORTED_VERSION | sed 's/.*version \(.*\) .*/\1/')