aboutsummaryrefslogtreecommitdiffstats
path: root/coin/provisioning/common/linux
diff options
context:
space:
mode:
authorDimitrios Apostolou <jimis@qt.io>2020-02-06 17:19:55 +0100
committerDimitrios Apostolou <jimis@qt.io>2020-02-15 07:39:06 +0100
commitd757c6d0ece7823a28c8601a56f567580aa8cf16 (patch)
treea2c6f01a28ce7afb0bbbe71e71f7d422993d605f /coin/provisioning/common/linux
parent0d208f77ec8c18f5907fbacc94a2b420e2710b3a (diff)
Try to catch all errors when sdkmanager installs
Task-number: QTQAINFRA-3531 Change-Id: I008c31a824287c60e67a665d0c2a3aebec863929 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Diffstat (limited to 'coin/provisioning/common/linux')
-rwxr-xr-xcoin/provisioning/common/linux/android_linux.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/coin/provisioning/common/linux/android_linux.sh b/coin/provisioning/common/linux/android_linux.sh
index 44bd2281..ca9110b8 100755
--- a/coin/provisioning/common/linux/android_linux.sh
+++ b/coin/provisioning/common/linux/android_linux.sh
@@ -37,6 +37,8 @@
# It also runs update for SDK API, latest SDK tools, latest platform-tools and build-tools version
+set -e
+
# shellcheck source=../unix/DownloadURL.sh
source "${BASH_SOURCE%/*}/../unix/DownloadURL.sh"
# shellcheck source=../unix/check_and_set_proxy.sh
@@ -80,8 +82,11 @@ else
sudo chown -R qt:users "$targetFolder"
fi
-# Run the following command under `eval` or `sh -c` so that the shell properly splits it
+# Stop the sdkmanager from printing thousands of lines of #hashmarks.
+# Run the following command under `eval` or `sh -c` so that the shell properly splits it.
sdkmanager_no_progress_bar_cmd="tr '\r' '\n' | grep -v '^\[[ =]*\]'"
+# But don't let the pipeline hide sdkmanager failures.
+set -o pipefail
echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
# shellcheck disable=SC2031