Update common.sh

This commit is contained in:
bryanthaboi
2026-08-10 14:59:04 -04:00
parent 9d73ff4110
commit bb979911c8
+4 -1
View File
@@ -142,7 +142,10 @@ download_pinned() {
rm -f "$dest" rm -f "$dest"
fi fi
say "downloading $(basename "$dest")" say "downloading $(basename "$dest")"
curl -fL --progress-bar "$url" -o "$dest.tmp" || fail "download failed: $url" # --retry-all-errors because plain --retry skips TLS handshake failures,
# which is how xiph.org drops these tarballs; the pin below still gates it.
curl -fL --retry 5 --retry-delay 2 --retry-all-errors --progress-bar \
"$url" -o "$dest.tmp" || fail "download failed: $url"
got="$(sha256_file "$dest.tmp")" got="$(sha256_file "$dest.tmp")"
[ "$got" = "$want" ] || fail "$(printf '%s\n expected %s\n got %s' \ [ "$got" = "$want" ] || fail "$(printf '%s\n expected %s\n got %s' \
"checksum mismatch for $(basename "$dest")" "$want" "$got")" "checksum mismatch for $(basename "$dest")" "$want" "$got")"