Refactor get_zorin()

pull/373/head
Martin Wimpress 3 years ago
parent 93a5a49d52
commit 6ddf92c772
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 7
      quickget

@ -1107,9 +1107,10 @@ function get_zorin() {
local URL=""
validate_release "releases_zorin"
# their redirector returns an href so we need to get that and parse out the iso
URL=$(curl -s "https://zrn.co/${RELEASE}" | cut -d'"' -f2)
ISO=$(echo "${URL}" | awk -F\/ ' {print $NF}')
# Parse out the iso URL from the redirector
URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}" 2>&1 | grep Location | cut -d' ' -f4)
#ISO=$(echo "${URL}" | awk -F\/ ' {print $NF}')
ISO="${URL##*/}"
web_get "${URL}" "${VM_PATH}"
make_vm_config "${ISO}"
}

Loading…
Cancel
Save