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.
This commit is contained in:
Marcus Müller 2018-03-11 19:40:49 +01:00 committed by xarkes
parent cd28e00bb5
commit 624cb8c99c

View File

@ -21,8 +21,8 @@ if [ $? = 0 ]; then
fi fi
# Check if qmake is available # Check if qmake is available
qmake --help >/dev/null 2>&1 qmakepath=$(which qmake)
if [ $? != 0 ]; then if [ -z "$qmakepath" ]; then
echo "You need qmake to build Cutter." echo "You need qmake to build Cutter."
echo "Please make sure qmake is in your PATH environment variable." echo "Please make sure qmake is in your PATH environment variable."
exit 1 exit 1