From 13a645ccaf757b9b73d9a14d5f9bf5cb4f924519 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 30 Apr 2023 13:39:55 +0200 Subject: [PATCH] Display exit code --- run/install.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/run/install.sh b/run/install.sh index b41dcc1..4442792 100644 --- a/run/install.sh +++ b/run/install.sh @@ -13,9 +13,8 @@ else PROGRESS="--progress=dot:giga" fi -if ! wget "$BOOT" -O "$TMP" -q --no-check-certificate --show-progress "$PROGRESS" ; then - echo "Failed to download ${BOOT}" && exit 60 -fi +{ wget "$BOOT" -O "$TMP" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || : +(( rc != 0 )) && echo "ERROR: Failed to download ${BOOT}, reason: $rc" && exit 60 [ ! -f "$TMP" ] && echo "Failed to download ${BOOT}" && exit 61