Skip to content

Commit

Permalink
Download "(arch)-Current.iso" when "(arch).iso" is unavailable
Browse files Browse the repository at this point in the history
  • Loading branch information
belphegor-belbel committed Feb 27, 2018
1 parent a6818ed commit 374388d
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions openSUSE_installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -1070,8 +1070,31 @@ Section "Install"
${If} $0 == "cancel"
Abort
${ElseIf} $0 != "success"
MessageBox MB_OK|MB_ICONSTOP "iso $(STRING_DOWNLOADERROR_R1)"
Abort
; try again with "-Current"
StrCpy $0 $distribution 14
${If} $distribution == "openSUSE Tumbleweed"
MessageBox MB_OK|MB_ICONSTOP "iso $(STRING_DOWNLOADERROR_R1)"
Abort
${ElseIf} $0 == "openSUSE Leap "
; openSUSE Leap
StrCpy $R3 $distribution 255 14
StrCpy $R1 "http://download.opensuse.org/distribution/leap/$R3/iso/openSUSE-Leap-$R3-NET-$architecture-Current.iso"
StrCpy $R2 "openSUSE-Leap-$R3-NET-$architecture-Current.iso"
${Else}
; openSUSE (before Leap)
StrCpy $R3 $distribution 255 9
StrCpy $R1 "http://download.opensuse.org/distribution/$R3/iso/openSUSE-$R3-NET-$architecture-Current.iso"
StrCpy $R2 "openSUSE-$R3-NET-$architecture-Current.iso"
${EndIf}

NSISdl::download $R1 "$dirVM\$R2"
Pop $0
${If} $0 == "cancel"
Abort
${ElseIf} $0 != "success"
MessageBox MB_OK|MB_ICONSTOP "iso $(STRING_DOWNLOADERROR_R1)"
Abort
${EndIf}
${EndIf}

${If} $environment == $(STRING_ENVIRONMENTSELECTITEM_VIRTUALBOX)
Expand Down

0 comments on commit 374388d

Please sign in to comment.