mirror of
https://github.com/dockur/windows.git
synced 2024-06-26 09:51:33 +00:00
feat: Refactor download code
This commit is contained in:
parent
c8babc636f
commit
9e1fb816ff
10
src/mido.sh
10
src/mido.sh
|
@ -519,7 +519,13 @@ downloadImage() {
|
|||
|
||||
if isMido "$version"; then
|
||||
tried="y"
|
||||
doMido "$iso" "$version" "$desc" && return 0
|
||||
if getWindows "$version"; then
|
||||
echo "MIDO_URL=$MIDO_URL"
|
||||
exit 33
|
||||
size=$(getMido "$version" "size")
|
||||
sum=$(getMido "$version" "sum")
|
||||
downloadFile "$iso" "$MIDO_URL" "$sum" "$size" "$desc" && return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
switchEdition "$version"
|
||||
|
@ -527,7 +533,7 @@ downloadImage() {
|
|||
if isESD "$version"; then
|
||||
|
||||
if [[ "$tried" != "n" ]]; then
|
||||
info "Failed to download $desc using Mido, will try a diferent method now..."
|
||||
info "Failed to download $desc, will try a diferent method now..."
|
||||
fi
|
||||
|
||||
tried="y"
|
||||
|
|
Loading…
Reference in a new issue