exit 1
fi
-## Locate qmake executable
+# Locate qmake executable
qmake_locations=("/usr/bin" "/usr/local/bin" "${HOME}/local/bin")
qmake_exec=""
for loc in ${qmake_locations[@]}; do
qmake_file="$loc/qmake"
if [ -x $qmake_file ]; then
- str=`$qmake_file --version | grep Using\ Qt\ version`
- version=`expr substr "$str" 18 3`
- if [ "$version" == "4.8" ]; then
+ version=`$qmake_file --version | grep Using\ Qt\ version | cut -d ' ' -f 4`
+ if [ "${version:0:3}" == "4.8" ]; then
qmake_exec=$qmake_file
fi
fi
done
+
if [ ! -x $qmake_exec ]; then
echo "$0: modify this script to put the correct location of qmake."
exit 1