mirror of
git://code.qt.io/qt/qt5.git
synced 2026-05-01 17:08:33 +08:00
Coin: add SourceEnvVar to source env vars written by SetEnvVars
This mainly moves scattered similar code that was already sourcing profile files to own script, so it can be re-used elsewhere. Change-Id: I11677226370fc52f50292d70c62cae5bd7c58d19 Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
This commit is contained in:
15
coin/provisioning/common/unix/SourceEnvVars.sh
Normal file
15
coin/provisioning/common/unix/SourceEnvVars.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# Copyright (C) 2026 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
|
||||||
|
|
||||||
|
# Sources the shell profile files where SetEnvVar.sh writes environment variables.
|
||||||
|
|
||||||
|
if uname -a |grep -q "Ubuntu"; then
|
||||||
|
if lsb_release -a |grep "Ubuntu 22.04"; then
|
||||||
|
source ~/.bash_profile
|
||||||
|
else
|
||||||
|
source ~/.profile
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
source ~/.bashrc
|
||||||
|
fi
|
||||||
@@ -9,20 +9,8 @@ set -ex
|
|||||||
source "${BASH_SOURCE%/*}/DownloadURL.sh"
|
source "${BASH_SOURCE%/*}/DownloadURL.sh"
|
||||||
# shellcheck source=./SetEnvVar.sh
|
# shellcheck source=./SetEnvVar.sh
|
||||||
source "${BASH_SOURCE%/*}/SetEnvVar.sh"
|
source "${BASH_SOURCE%/*}/SetEnvVar.sh"
|
||||||
|
# shellcheck source=./SourceEnvVars.sh
|
||||||
# Extract cmake path from the environment
|
source "${BASH_SOURCE%/*}/SourceEnvVars.sh"
|
||||||
if uname -a |grep -q "Ubuntu"; then
|
|
||||||
if lsb_release -a |grep -q "Ubuntu 22.04"; then
|
|
||||||
# shellcheck source=/dev/null
|
|
||||||
source ~/.bash_profile
|
|
||||||
else
|
|
||||||
# shellcheck source=/dev/null
|
|
||||||
source ~/.profile
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
# shellcheck source=/dev/null
|
|
||||||
source ~/.bashrc
|
|
||||||
fi
|
|
||||||
|
|
||||||
version="1.50.1"
|
version="1.50.1"
|
||||||
sha1="be1b0c3dbfbc9714824921f50dffb7cf044da5ab"
|
sha1="be1b0c3dbfbc9714824921f50dffb7cf044da5ab"
|
||||||
|
|||||||
@@ -6,17 +6,8 @@
|
|||||||
source "${BASH_SOURCE%/*}/DownloadURL.sh"
|
source "${BASH_SOURCE%/*}/DownloadURL.sh"
|
||||||
# shellcheck source=./SetEnvVar.sh
|
# shellcheck source=./SetEnvVar.sh
|
||||||
source "${BASH_SOURCE%/*}/SetEnvVar.sh"
|
source "${BASH_SOURCE%/*}/SetEnvVar.sh"
|
||||||
|
# shellcheck source=./SourceEnvVars.sh
|
||||||
# Extract cmake path from the environment
|
source "${BASH_SOURCE%/*}/SourceEnvVars.sh"
|
||||||
if uname -a |grep -q "Ubuntu"; then
|
|
||||||
if lsb_release -a |grep "Ubuntu 22.04"; then
|
|
||||||
source ~/.bash_profile
|
|
||||||
else
|
|
||||||
source ~/.profile
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
source ~/.bashrc
|
|
||||||
fi
|
|
||||||
|
|
||||||
# This script will install Google's Protocal Buffers
|
# This script will install Google's Protocal Buffers
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user