diff options
author | Ivan Komissarov <abbapoh@gmail.com> | 2021-02-21 20:55:30 +0100 |
---|---|---|
committer | Ivan Komissarov <ABBAPOH@gmail.com> | 2021-03-02 14:40:26 +0000 |
commit | 1e532e243a1ea7adab99d02920e5e0e1336bdb27 (patch) | |
tree | acbff03efbc2be4f589b700aea23def65779c172 | |
parent | 5f6f9299aab5ac81808496532a67d25860516191 (diff) |
install-qt.sh: Skip modules that are not existent in requested version
Change-Id: I1d918c8c56891e980aa862c005eb0b0a6114626a
Reviewed-by: Denis Shienkov <denis.shienkov@gmail.com>
-rwxr-xr-x | scripts/install-qt.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/install-qt.sh b/scripts/install-qt.sh index a66ac28b1..9a3595062 100755 --- a/scripts/install-qt.sh +++ b/scripts/install-qt.sh @@ -288,6 +288,10 @@ function compute_url(){ exit 1 } +function version { + echo "$@" | awk -F. '{ printf("%03d%03d%03d\n", $1,$2,$3); }'; +} + mkdir -p ${INSTALL_DIR} rm -f "${HASH_FILEPATH}" @@ -300,6 +304,18 @@ for COMPONENT in ${COMPONENTS}; do UNPACK_DIR="${INSTALL_DIR}" fi + if [ "$(version "${VERSION}")" -ge "$(version "6.0.0")" ]; then + if [[ "${COMPONENT}" =~ "qtscript" ]] || [[ "${COMPONENT}" =~ "qtscxml" ]] || [[ "${COMPONENT}" =~ "qtx11extras" ]]; then + echo "Component ${COMPONENT} was removed in Qt6, skipping" >&2 + continue + fi + else + if [[ "${COMPONENT}" =~ "qt5compat" ]]; then + echo "Component ${COMPONENT} is not present in Qt ${VERSION}, skipping" >&2 + continue + fi + fi + URL="$(compute_url ${COMPONENT})" echo "Downloading ${COMPONENT} ${URL}..." >&2 curl --progress-bar -L -o ${DOWNLOAD_DIR}/package.7z ${URL} >&2 |