From 87d8f139901b81d1c1eda0ef13f6afed7f833c59 Mon Sep 17 00:00:00 2001 From: Ilya Zverev Date: Wed, 20 Jan 2016 17:48:38 +0300 Subject: [PATCH] [build] Make detect_qmake better --- tools/autobuild/detect_qmake.sh | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tools/autobuild/detect_qmake.sh b/tools/autobuild/detect_qmake.sh index 4df91cfe2c..0245427087 100755 --- a/tools/autobuild/detect_qmake.sh +++ b/tools/autobuild/detect_qmake.sh @@ -8,15 +8,10 @@ set -e -u KNOWN_QMAKE_PATHS=( \ /Developer/Tools/qmake \ /usr/local/opt/qt5/bin/qmake \ - ~/Developer/Qt/5.3/clang_64/bin/qmake \ - ~/Developer/Qt/5.5/clang_64/bin/qmake \ - ~/Qt/5.3/clang_64/bin/qmake \ - ~/Qt/5.4/clang_64/bin/qmake \ - ~/Qt/5.5/clang_64/bin/qmake \ - ~/Qt5.3.0/5.3/clang_64/bin/qmake \ - ~/Developer/Qt/5.4/clang_64/bin/qmake \ - ~/Developer/Qt/5.5/clang_64/bin/qmake \ - /cygdrive/c/Qt/5.5/msvc2013_64/bin/qmake.exe \ + ~/Developer/Qt/5.?/clang_64/bin/qmake \ + ~/Qt/5.?/clang_64/bin/qmake \ + ~/Qt5.?.0/5.?/clang_64/bin/qmake \ + /cygdrive/c/Qt/5.?/msvc2013_64/bin/qmake.exe \ ) # Prints path to directory with found qmake binary or prints nothing if not found @@ -28,8 +23,8 @@ elif QMAKE="$(which qmake)"; then else # qmake binary is not in the path, look for it in the given array for path in "${KNOWN_QMAKE_PATHS[@]}"; do - if [ -x "${path}" ]; then - QMAKE="${path}" + if [ -x "$path" ]; then + QMAKE="$path" return 0 fi done