mirror of
git://code.qt.io/qt/qt5.git
synced 2026-03-17 17:56:11 +08:00
- Rename the sha256 variable to sha1, because that's the actual
algorithm that was used to calculate the checksum.
- Use the `version` variable when constructing `externalUrl`.
Amends 0ac4df3e52.
Change-Id: I79d38fdf5033dce7d0b04c2d8788767b2325895f
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
35 lines
1.0 KiB
Bash
Executable File
35 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (C) 2025 The Qt Company Ltd.
|
|
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
|
|
|
set -ex
|
|
|
|
# shellcheck source=./DownloadURL.sh
|
|
source "${BASH_SOURCE%/*}/DownloadURL.sh"
|
|
# shellcheck source=./SetEnvVar.sh
|
|
source "${BASH_SOURCE%/*}/SetEnvVar.sh"
|
|
|
|
# This script will install maven 3.9.11
|
|
version="3.9.11"
|
|
|
|
sha1="c084cde986ba878da4370bde009ab0a0a1936343"
|
|
pkgname="apache-maven-$version-bin.tar.gz"
|
|
dirname="apache-maven-$version"
|
|
|
|
internalUrl="http://ci-files01-hki.ci.qt.io/input/qtopenapi/maven/$pkgname"
|
|
externalUrl="https://dlcdn.apache.org/maven/maven-3/$version/binaries/$pkgname"
|
|
|
|
targetFile="$HOME/$pkgname"
|
|
DownloadURL "$internalUrl" "$externalUrl" "$sha1" "$targetFile"
|
|
echo "Installing Maven"
|
|
tar -xzf "$targetFile" -C "$HOME"
|
|
rm "$targetFile"
|
|
|
|
sudo mkdir -p "/opt/maven/"
|
|
installPrefix="/opt/maven/$dirname"
|
|
sudo mv "$HOME/$dirname" "$installPrefix"
|
|
|
|
SetEnvVar "PATH" "$installPrefix/bin:$PATH"
|
|
echo "Maven = $version" >> ~/versions.txt
|
|
|