From 7ca9fe477c4d2e1e5aaf4d39daaf1e2f1ce22839 Mon Sep 17 00:00:00 2001 From: Kroese Date: Mon, 8 Apr 2024 04:52:32 +0200 Subject: [PATCH] fix: Continue when range request fails --- src/install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/install.sh b/src/install.sh index 3b056e90..1ea3fd73 100644 --- a/src/install.sh +++ b/src/install.sh @@ -122,9 +122,13 @@ if [ ! -f "$RDC" ]; then { curl -r "$POS" -sfk -S -o "$RD" "$LOC"; rc=$?; } || : fKill "progress.sh" - (( rc != 0 )) && error "Failed to download $LOC, reason: $rc" && exit 60 - SUM=$(md5sum "$RD" | cut -f 1 -d " ") + if (( rc != 0 )); then + (( rc != 22 )) && error "Failed to download $LOC, reason: $rc" && exit 60 + SUM="skip" + else + SUM=$(md5sum "$RD" | cut -f 1 -d " ") + fi if [ "$SUM" != "$VERIFY" ]; then