From 6ddf92c7728f07d3438c3faf09e931274066d368 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 09:47:47 +0000 Subject: [PATCH] Refactor get_zorin() --- quickget | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/quickget b/quickget index 0659669..7cc2c8b 100755 --- a/quickget +++ b/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}" }