feat: Refactor download code

This commit is contained in:
Kroese 2024-05-16 19:54:32 +02:00 committed by GitHub
parent 999d57084c
commit 558ab47cea
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -209,17 +209,6 @@ detectCustom() {
return 0
}
removeDownload() {
local iso="$1"
[ ! -f "$iso" ] && return 0
[ -n "$CUSTOM" ] && return 0
! rm -f "$iso" 2> /dev/null && warn "failed to remove $iso !"
return 0
}
extractESD() {
local iso="$1"
@ -684,6 +673,17 @@ updateImage() {
return 0
}
removeDownload() {
local iso="$1"
[ ! -f "$iso" ] && return 0
[ -n "$CUSTOM" ] && return 0
! rm -f "$iso" 2> /dev/null && warn "failed to remove $iso !"
return 0
}
copyOEM() {
local dir="$1"