Display exit code

This commit is contained in:
Kroese 2023-04-30 00:36:37 +02:00 committed by GitHub
parent 9a16ba85dd
commit c80315c8b7

View File

@ -69,9 +69,8 @@ else
PROGRESS="--progress=dot:giga" PROGRESS="--progress=dot:giga"
fi fi
if ! wget "$URL" -O "$PAT" -q --no-check-certificate --show-progress "$PROGRESS"; then { wget "$URL" -O "$PAT" -q --no-check-certificate --show-progress "$PROGRESS"; rc=$?; } || :
echo "ERROR: Failed to download $URL" && exit 69 (( rc != 0 )) && echo "ERROR: Failed to download $URL, reason: $rc" && exit 69
fi
[ ! -f "$PAT" ] && echo "ERROR: Failed to download $URL" && exit 69 [ ! -f "$PAT" ] && echo "ERROR: Failed to download $URL" && exit 69