Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:rhabacker:linkedprojecttest
mingw32-qml-autoreqprov
mingw32-qml.req
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File mingw32-qml.req of Package mingw32-qml-autoreqprov
#!/bin/bash # SPDX-FileCopyrightText: 2020-2021 Fabian Vogt <fabian@ritter-vogt.de> # SPDX-License-Identifier: GPL-3.0-or-later set -euo pipefail qtvers= ret=0 versioned=0 while [ $# -gt 0 ]; do case $1 in --qtver) qtvers=$2 shift ;; --versioned) versioned=1 ;; *) echo "Unknown argument $1" >&2 exit 1 esac shift done # Guess Qt version qtver=5 # TODO #[[ -n ${qtvers} ]] || qtvers="5 6 7" #for ver in ${qtvers}; do # stat /usr/lib*/qt${ver} &>/dev/null && qtver="${qtver}${ver}" #done # Zero or more than one version of Qt found. Abort. if [[ ${#qtver} -ne 1 ]]; then echo "Failed to guess Qt version!" >&2 exit 1 fi importscanner="qmlimportscanner" command -v "$importscanner" &>/dev/null || echo "Failed to locate qmlimportscanner" declare -A dependencies # foundDependency mingw32(qt5qmlimport:Module.Uri.42) 69 # In the dependencies array, it sets the version of mingw32(qt5qmlimport:Module.Uri.42) to 69, if lower foundDependency() { if [[ $versioned ]]; then if [ ${dependencies[$1]:=0} -lt $2 ]; then dependencies[$1]=$2 fi else dependencies[$1] = 1 fi } # TODO: Get exit status of qmlimportscanner while read import min; do foundDependency "mingw32(qt${qtver}qmlimport:${import})" "$min" done < <(grep -vE '/designer/.*\.qml' | xargs -r "$importscanner" -qmlFiles | jq -r '.[] | select(.type == "module") | .name + " " + .version' | gawk 'match($2, /^([0-9]+)\.([0-9]+)$/, ver) { printf "%s.%d %d\n", $1, ver[1], ver[2]; }') for export in "${!dependencies[@]}"; do if [[ $versioned ]]; then echo "${export} >= ${dependencies["$export"]}" else echo "${export}" fi done exit $ret
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor