summaryrefslogtreecommitdiffstats
path: root/coin
diff options
context:
space:
mode:
authorDimitrios Apostolou <jimis@qt.io>2020-01-29 15:48:14 +0100
committerDimitrios Apostolou <jimis@qt.io>2020-02-15 07:38:57 +0100
commitd84b366d555e42797cf242c3534d29eb1f8eb45e (patch)
tree0fbc5b6b9b5a45c34cef92ce00a243b8816c2fb9 /coin
parent27e42b7a3c0ff050dfa6a16922d7ee64b7a58b30 (diff)
Silence the sdkmanager progress bar on macos
The exact same method is already in use on all Linux provisions, it was just copied to macos. Change-Id: I873f6efd99b147c5364e0dda6c26c7dad7dee480 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
Diffstat (limited to 'coin')
-rwxr-xr-xcoin/provisioning/qtci-macos-10.13-x86_64/30-android.sh7
-rwxr-xr-xcoin/provisioning/qtci-macos-10.14-x86_64/30-android.sh7
2 files changed, 12 insertions, 2 deletions
diff --git a/coin/provisioning/qtci-macos-10.13-x86_64/30-android.sh b/coin/provisioning/qtci-macos-10.13-x86_64/30-android.sh
index 1886cce3..aa0935f0 100755
--- a/coin/provisioning/qtci-macos-10.13-x86_64/30-android.sh
+++ b/coin/provisioning/qtci-macos-10.13-x86_64/30-android.sh
@@ -68,8 +68,13 @@ sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder"
echo "Changing ownership of Android files."
sudo chown -R qt:wheel "$targetFolder"
+# 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 '^\[[ =]*\]'"
+
echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
-(echo "y"; echo "y") |"$sdkTargetFolder/tools/bin/sdkmanager" "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion"
+(echo "y"; echo "y") | "$sdkTargetFolder/tools/bin/sdkmanager" \
+ "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
+ | eval $sdkmanager_no_progress_bar_cmd
echo "Checking the contents of Android SDK..."
ls -l "$sdkTargetFolder"
diff --git a/coin/provisioning/qtci-macos-10.14-x86_64/30-android.sh b/coin/provisioning/qtci-macos-10.14-x86_64/30-android.sh
index 1886cce3..aa0935f0 100755
--- a/coin/provisioning/qtci-macos-10.14-x86_64/30-android.sh
+++ b/coin/provisioning/qtci-macos-10.14-x86_64/30-android.sh
@@ -68,8 +68,13 @@ sudo unzip -q "$toolsSourceFile" -d "$sdkTargetFolder"
echo "Changing ownership of Android files."
sudo chown -R qt:wheel "$targetFolder"
+# 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 '^\[[ =]*\]'"
+
echo "Running SDK manager for platforms;$sdkApiLevel, platform-tools and build-tools;$sdkBuildToolsVersion."
-(echo "y"; echo "y") |"$sdkTargetFolder/tools/bin/sdkmanager" "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion"
+(echo "y"; echo "y") | "$sdkTargetFolder/tools/bin/sdkmanager" \
+ "platforms;$sdkApiLevel" "platform-tools" "build-tools;$sdkBuildToolsVersion" \
+ | eval $sdkmanager_no_progress_bar_cmd
echo "Checking the contents of Android SDK..."
ls -l "$sdkTargetFolder"