mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-25 16:16:23 +08:00
Newer needed for openSUSE 16.0 Task-number: QTQAINFRA-7517 Change-Id: I636c0f293c78e8d8dcc0810c52589a0e7e809854 Reviewed-by: Simo Fält <simo.falt@qt.io>
34 lines
1.0 KiB
Bash
Executable File
34 lines
1.0 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Copyright (C) 2022 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
|
|
|
|
# This script install git from sources.
|
|
# Requires GCC and Perl to be in PATH.
|
|
set -ex
|
|
|
|
# shellcheck source=../unix/DownloadURL.sh
|
|
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
|
|
# shellcheck source=../unix/SetEnvVar.sh
|
|
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
|
|
|
version="2.51.1"
|
|
officialUrl="https://github.com/git/git/archive/refs/tags/v$version.tar.gz"
|
|
cachedUrl="http://ci-files01-hki.ci.qt.io/input/git/git-$version.tar.gz"
|
|
targetFile="/tmp/git-$version.tar.gz"
|
|
sha="8a9373d536699c695a58170512983f239ac61979"
|
|
DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile"
|
|
sourceDir="/tmp/git-$version-source"
|
|
mkdir "$sourceDir"
|
|
tar -xzf "$targetFile" -C "$sourceDir"
|
|
|
|
cd "$sourceDir/git-$version"
|
|
installDir="$HOME/git"
|
|
make configure
|
|
./configure --prefix="$installDir"
|
|
make all
|
|
sudo make install
|
|
|
|
SetEnvVar "PATH" "\"$installDir/bin:\$PATH\""
|
|
|
|
"$installDir/bin/git" --version
|