diff options
author | Heikki Halmet <heikki.halmet@qt.io> | 2017-11-03 13:09:55 +0200 |
---|---|---|
committer | Tony Sarajärvi <tony.sarajarvi@qt.io> | 2017-11-07 15:25:12 +0000 |
commit | 0e278c4e95aa5d2e9df315125c119f36149fcc95 (patch) | |
tree | bdab43c4e17dc02ce2a61c8c7d3fd8384efec717 /coin/provisioning/common | |
parent | 894c63834baf28c78c87e39d25bc8940d4e35cb6 (diff) |
Provisioning: Remove logical OR when echo errors
set -e won't work if logical OR is used after commands. These error
echo's need to be removed so that error catch will works. Also set -ex
added to print executed command when error caught.
Task-number: QTQAINFRA-1533
Change-Id: Ib4ea832a0ee813f99f59ebacad51ec57c3eff57d
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
Diffstat (limited to 'coin/provisioning/common')
-rw-r--r-- | coin/provisioning/common/qnx_700.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/coin/provisioning/common/qnx_700.sh b/coin/provisioning/common/qnx_700.sh index 0b17a7a0..1f1c0f3f 100644 --- a/coin/provisioning/common/qnx_700.sh +++ b/coin/provisioning/common/qnx_700.sh @@ -35,18 +35,18 @@ # This script installs QNX 7. -set -e +set -ex targetFolder="/opt/" sourceFile="http://ci-files01-hki.intra.qt.io/input/qnx/qnx700.tar.xz" sha1="949a87c5f00d0756956cb4b1b3b213ecaeee9113" folderName="qnx700" targetFile="qnx700.tar.xz" -wget --tries=5 --waitretry=5 --output-document="$targetFile" "$sourceFile" || echo "Failed to download '$url' multiple times" -echo "$sha1 $targetFile" | sha1sum --check || echo "Failed to check sha1sum" +wget --tries=5 --waitretry=5 --output-document="$targetFile" "$sourceFile" +echo "$sha1 $targetFile" | sha1sum --check if [ ! -d "$targetFolder" ]; then mkdir -p $targetFolder fi -sudo tar -C $targetFolder -Jxf $targetFile|| echo "Failed to extract $targetFile" +sudo tar -C $targetFolder -Jxf $targetFile sudo chown -R qt:users "$targetFolder"/"$folderName" # Verify that we have last file in tar |