feat: Resume failed download (#301)

This commit is contained in:
Kroese 2025-09-20 14:46:28 +02:00 committed by GitHub
parent fb044b9158
commit 109b84fd6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -150,8 +150,12 @@ install() {
local file="$STORAGE/boot.dmg"
if ! download "$file" "$board" "$version"; then
rm -f "$file"
exit 60
info "Retrying failed download in 5 seconds..."
sleep 5
if ! download "$file" "$board" "$version"; then
rm -f "$file"
exit 60
fi
fi
mv -f "$file" "$dest"