diff options
author | Tony Sarajärvi <tony.sarajarvi@qt.io> | 2018-03-08 13:30:24 +0200 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@qt.io> | 2018-03-19 11:57:00 +0000 |
commit | a98b0f3d7989bedf6f0bcc1a83b52aad1d3baa3e (patch) | |
tree | 14fd897680fa5afc82dd54951657882d14dc4d0e /coin/provisioning/common/macos/fbx_macos.sh | |
parent | 90261c1df5cb62a47b44d2d9b84c0753d6ebf9e4 (diff) |
Remove try_catch codes from common macOS scripts
Change-Id: I66291e2da5514499387b61e01ad85a652cd24d7b
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Diffstat (limited to 'coin/provisioning/common/macos/fbx_macos.sh')
-rwxr-xr-x | coin/provisioning/common/macos/fbx_macos.sh | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/coin/provisioning/common/macos/fbx_macos.sh b/coin/provisioning/common/macos/fbx_macos.sh index b2ec8154..40776938 100755 --- a/coin/provisioning/common/macos/fbx_macos.sh +++ b/coin/provisioning/common/macos/fbx_macos.sh @@ -34,8 +34,8 @@ # This script installs FBX SDK -# shellcheck source=./../unix/try_catch.sh -source "${BASH_SOURCE%/*}/../unix/try_catch.sh" +set -ex + # shellcheck source=../unix/SetEnvVar.sh source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh" @@ -50,27 +50,18 @@ installer="$targetFolder/fbx20161_2_fbxsdk_clang_macos.pkg" ExceptionExtractPrimaryUrl=100 -try -( - echo "Extracting '$cachedUrl'" - tar -xzf "$cachedUrl" -C "$targetFolder" || throw $ExceptionExtractPrimaryUrl +echo "Extracting '$cachedUrl'" +tar -xzf "$cachedUrl" -C "$targetFolder" || ( + echo "Failed to uncompress from '$cachedUrl'" + echo "Downloading from '$officialUrl'" + curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$officialUrl" + echo "Checking SHA1 on PKG '$targetFile'" + echo "$sha1 *$targetFile" > $targetFile.sha1 + shasum --check $targetFile.sha1 + echo "Extracting '$targetFile'" + tar -xzf "$targetFile" -C "$targetFolder" ) -catch || { - case $ex_code in - $ExceptionExtractPrimaryUrl) - set -e - echo "Failed to uncompress from '$cachedUrl'" - echo "Downloading from '$officialUrl'" - curl --fail -L --retry 5 --retry-delay 5 -o "$targetFile" "$officialUrl" || exit 1; - echo "Checking SHA1 on PKG '$targetFile'" - echo "$sha1 *$targetFile" > $targetFile.sha1 - shasum --check $targetFile.sha1 - echo "Extracting '$targetFile'" - tar -xzf "$targetFile" -C "$targetFolder" || exit 1; - ;; - esac -} -set -e + rm -rf "$targetFile" echo "Running installer for '$installer'" sudo installer -pkg "$installer" -target "/" |