Unverified Commit 109b84fd authored by Kroese's avatar Kroese Committed by GitHub
Browse files

feat: Resume failed download (#301)

parent fb044b91
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -149,10 +149,14 @@ install() {

  local file="$STORAGE/boot.dmg"
    
  if ! download "$file" "$board" "$version"; then
    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"
  return 0