diff options
author | Jędrzej Nowacki <jedrzej.nowacki@qt.io> | 2018-02-22 15:28:20 +0100 |
---|---|---|
committer | Jędrzej Nowacki <jedrzej.nowacki@qt.io> | 2018-03-06 06:41:46 +0000 |
commit | bb9739773ccd2844bad5e8c0124405acb3315ecb (patch) | |
tree | 097091a4d93c4712da9c7e652bfe2e16cb145906 | |
parent | 764294fcb874223625bb79c91acb816ffb6ad2b2 (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>
-rwxr-xr-x | coin/provisioning/common/linux/openssl_for_android_linux.sh | 40 |
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 |