summaryrefslogtreecommitdiffstats
path: root/remote
diff options
context:
space:
mode:
authorSimon Rettberg2014-07-09 13:11:34 +0200
committerSimon Rettberg2014-07-09 13:11:34 +0200
commit597c5a0c6e37626bcc2c896a13e9c72c90c2cbc2 (patch)
treee5a83206b47e756ce1d4fe825d60dcb7f9fa3d02 /remote
parentChange ubuntu 14.04 configs to 14 (diff)
downloadtm-scripts-597c5a0c6e37626bcc2c896a13e9c72c90c2cbc2.tar.gz
tm-scripts-597c5a0c6e37626bcc2c896a13e9c72c90c2cbc2.tar.xz
tm-scripts-597c5a0c6e37626bcc2c896a13e9c72c90c2cbc2.zip
[qt.inc] Fix function if the desired version is installed for 32 and 64 bit
Diffstat (limited to 'remote')
-rw-r--r--remote/includes/qt.inc3
1 files changed, 2 insertions, 1 deletions
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