aboutsummaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorJędrzej Nowacki <jedrzej.nowacki@qt.io>2018-02-22 15:28:20 +0100
committerLiang Qi <liang.qi@qt.io>2018-04-18 18:15:09 +0000
commit71282805a5408ce0175aa1ee948ffc0cfbe7af7b (patch)
tree85d055e4616906ee12946558dd56359b5d060ad9 /coin
parent9497487c77ed2544b20c6ee5829d9aeb763db057 (diff)
Simplify openssl_for_android_linux provisioning script
The script was over-engineered. The new version provides the same functionality while removing uninteresting postmortem messages. In addition try_catch.sh has a bug that injects set +e So it is good to avoid using it. Change-Id: I9e26e8fedad71d40270fe94695d5e1c09c3d9023 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> (cherry picked from commit bb9739773ccd2844bad5e8c0124405acb3315ecb) Reviewed-by: Simo Fält <simo.falt@qt.io>
Diffstat (limited to 'coin')
-rwxr-xr-xcoin/provisioning/common/linux/openssl_for_android_linux.sh40
1 files changed, 9 insertions, 31 deletions
diff --git a/coin/provisioning/common/linux/openssl_for_android_linux.sh b/coin/provisioning/common/linux/openssl_for_android_linux.sh
index e9f50b87..30022c39 100755
--- a/coin/provisioning/common/linux/openssl_for_android_linux.sh
+++ b/coin/provisioning/common/linux/openssl_for_android_linux.sh
@@ -36,7 +36,6 @@
# This script install OpenSSL from sources.
# Requires GCC and Perl to be in PATH.
-source "${BASH_SOURCE%/*}/../unix/try_catch.sh"
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
@@ -51,37 +50,16 @@ sha="36af23887402a5ea4ebef91df8e61654906f58f2"
# QTQAINFRA-1436
opensslHome="${installFolder}openssl-1.0.2"
-ExceptionDownload=99
-ExceptionTar=100
-ExceptionConfig=101
+DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile"
-try
-(
- (DownloadURL "$cachedUrl" "$officialUrl" "$sha" "$targetFile") || throw $ExceptionDownload
+tar -xzf "$targetFile" -C "$installFolder"
+# This rename should be removed once hard coded path from Coin is fixed. (QTQAINFRA-1436)
+mv "${opensslHome}g" "${opensslHome}"
+pushd "$opensslHome"
- tar -xzf "$targetFile" -C "$installFolder" || throw $ExceptionTar
- # This rename should be removed once hard coded path from Coin is fixed. (QTQAINFRA-1436)
- mv "${opensslHome}g" "${opensslHome}"
- pushd "$opensslHome"
- perl Configure shared android || throw $ExceptionConfig
+echo "Running configure"
+perl Configure shared android
- SetEnvVar "OPENSSL_ANDROID_HOME" "$opensslHome"
+SetEnvVar "OPENSSL_ANDROID_HOME" "$opensslHome"
- echo "OpenSSL for Android = $version" >> ~/versions.txt
-)
-catch || {
- case $ex_code in
- $ExceptionDownload)
- exit 1;
- ;;
- $ExceptionTar)
- echo "Failed to extract $targetFile"
- exit 1;
- ;;
- $ExceptionConfig)
- echo "Failed to run 'config'."
- exit 1;
- ;;
- esac
-
-}
+echo "OpenSSL for Android = $version" >> ~/versions.txt