From 597c5a0c6e37626bcc2c896a13e9c72c90c2cbc2 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 9 Jul 2014 13:11:34 +0200 Subject: [qt.inc] Fix function if the desired version is installed for 32 and 64 bit --- remote/includes/qt.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/remote/includes/qt.inc b/remote/includes/qt.inc index f0e3f3e6..2b13c1f3 100644 --- a/remote/includes/qt.inc +++ b/remote/includes/qt.inc @@ -12,7 +12,8 @@ activate_qt() { [[ "$(basename "$QT_DEFAULT")" =~ ^qt$QT_VERSION.*\.conf$ ]] || perror "Something with QT4 is bad. Check '/usr/share/qtchooser'" else # no default active, try to set it - local QT_CANDIDATES="$(ls "/usr/share/qtchooser" | grep -v "default.conf" | grep "qt$QT_VERSION")" + local QT_CANDIDATES="$(find "/usr/share/qtchooser" -name "qt$QT_VERSION*" | grep -E "$ARCHREGEX")" + [ -z "$QT_CANDIDATES" ] && QT_CANDIDATES="$(find "/usr/share/qtchooser" -name "qt$QT_VERSION*")" local QTS="$(echo "$QT_CANDIDATES" | wc -w)" if [ "$QTS" -eq 1 ]; then # we found it, lets activate it and hope for the best -- cgit v1.2.3-55-g7522