From 9862e834f70a19ca3fe4c3f0fc665f2c2666d7d0 Mon Sep 17 00:00:00 2001 From: Damian Michalak-Szmacinski Date: Fri, 29 Jul 2022 12:40:46 +0200 Subject: [PATCH] Download changes --- .../tizen-sdk-installer/install.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/integrations/docker/images/chip-build-tizen/tizen-sdk-installer/install.sh b/integrations/docker/images/chip-build-tizen/tizen-sdk-installer/install.sh index 895369323a5a9a..da19b6b66cb3d7 100755 --- a/integrations/docker/images/chip-build-tizen/tizen-sdk-installer/install.sh +++ b/integrations/docker/images/chip-build-tizen/tizen-sdk-installer/install.sh @@ -88,8 +88,18 @@ function show_dependencies() { function download() { echo "$COLOR_BLUE" - for package in "${@:2}"; do - wget -r -nd --no-parent --progress=dot:mega -A "$package" "$1" + PKGS=() + for PKG in "${@:2}"; do + PKGS+=("-A" "$PKG") + done + wget -r -nd --no-parent --progress=dot:mega "${PKGS[@]}" "$1" + + # Check if the files have been downloaded + for PKG in "${@:2}"; do + if [[ ! $(find . -type f -name "$PKG") ]]; then + error "PKG is missing: $PKG" + return 1 + fi done echo -n "$COLOR_NONE"