From 624cb8c99c01094f078a036ae9d6119d495d6541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcus=20M=C3=BCller?= Date: Sun, 11 Mar 2018 19:40:49 +0100 Subject: [PATCH] build.sh: check for existence of qmake, don't call it with wrong opts (#388) This fixes #387. Formerly, `qmake --help` was called, and the return value was checked for being 0, but `--help` is not a valid option in any of my qmakes. `-help` would be correct, but even with that, qmake returns a non-zero value. So, simply replaced that with a check for the existence of the qmake executable. --- build.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 7a423fa4..a6a1a957 100755 --- a/build.sh +++ b/build.sh @@ -21,8 +21,8 @@ if [ $? = 0 ]; then fi # Check if qmake is available -qmake --help >/dev/null 2>&1 -if [ $? != 0 ]; then +qmakepath=$(which qmake) +if [ -z "$qmakepath" ]; then echo "You need qmake to build Cutter." echo "Please make sure qmake is in your PATH environment variable." exit 1