Provisioning: Use SetEnvVar helper function in scripts

Currently when adding an environment variable in provisioning we have
to check if the system is Ubuntu and use .profile instead of .bashrc.
This check should be done in a function so we don't have to duplicate
it for every provisioning script separately.

Change-Id: I2fa128032123e17d20dfb39cd3668e22e4bb0d55
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
This commit is contained in:
Joni Jantti
2018-01-24 10:48:07 +02:00
committed by Liang Qi
parent 7681e742d7
commit 6d1190aaa0
20 changed files with 130 additions and 42 deletions

View File

@@ -38,6 +38,7 @@
source "${BASH_SOURCE%/*}/../unix/try_catch.sh"
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
version="1.0.2g"
officialUrl="https://www.openssl.org/source/openssl-$version.tar.gz"
@@ -64,7 +65,8 @@ try
pushd "$opensslHome"
perl Configure shared android || throw $ExceptionConfig
echo "export OPENSSL_ANDROID_HOME=$opensslHome" >> ~/.bashrc
SetEnvVar "OPENSSL_ANDROID_HOME" "$opensslHome"
echo "OpenSSL for Android = $version" >> ~/versions.txt
)
catch || {