From 24b821d74bedf13f7f0eee544424585f5919a4dc Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 15 Apr 2023 18:09:20 +0200 Subject: [PATCH] Error handling --- install.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 2f1e603..2c51383 100644 --- a/install.sh +++ b/install.sh @@ -4,15 +4,15 @@ set -eu FILE="$IMG/boot.img" rm -f "$FILE" -echo "Downloading $BOOT..." +echo "Downloading ${BOOT}..." # Check if running with interactive TTY or redirected to docker log if [ -t 1 ]; then - wget "$BOOT" -O "$FILE".tmp -q --no-check-certificate --show-progress + wget "${BOOT}" -O "$FILE".tmp -q --no-check-certificate --show-progress else - wget "$BOOT" -O "$FILE".tmp -q --no-check-certificate --show-progress --progress=dot:giga + wget "${BOOT}" -O "$FILE".tmp -q --no-check-certificate --show-progress --progress=dot:giga fi -[ ! -f "$FILE".tmp ] && echo "Download failed" && exit 61 +[ ! -f "$FILE".tmp ] && echo "Failed to download ${BOOT}" && exit 61 mv -f "$FILE".tmp "$FILE"