Skip to content

Commit

Permalink
A try to fix qt tools detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Ri0n committed Aug 6, 2017
1 parent dd9c10d commit ecc2d97
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/posix/libpsibuild.sh
Expand Up @@ -297,16 +297,16 @@ set_psi_env() {
log "Found patch tool" log "Found patch tool"


find_qt_util() { find_qt_util() {
local name=$1 local name=$1 # util name
local vp="${2:--v}" local vp="${2:--v}" # version command line switch. of -v by default
result="" result=""
local vs=Qt local vs=Qt
[ -n "$qt_ver" ] && vs="$qt_ver" [ -n "$qt_ver" ] && vs="$qt_ver" # exact desired Qt version the tool belongs too. not given for qmake.


qtest() { [ -n "$($1 $vp 2>&1 |grep "$vs")" ]; return $?; } qtest() { [ -n "$($1 $vp 2>&1 |grep "$vs")" ]; return $?; }


for v in ${QT_VERSIONS_PRIORITY}; do for v in ${QT_VERSIONS_PRIORITY}; do
for un in $full_name $name-qt${QT_MAJOR_VERSION} qt${QT_MAJOR_VERSION}-${name} ${name}${QT_MAJOR_VERSION}; do for un in $name-qt${v} qt${v}-${name} ${name}${v}; do
[ -n "$qtbindir" ] && un="$qtbindir/$un" # we want all qt util to be in the same dir [ -n "$qtbindir" ] && un="$qtbindir/$un" # we want all qt util to be in the same dir
#echo "Check for $un" #echo "Check for $un"
qtest $un && { result="$un"; break 2; } qtest $un && { result="$un"; break 2; }
Expand Down

0 comments on commit ecc2d97

Please sign in to comment.