From 3454f4fae04491ee760d958b9dc01dc476c37d7a Mon Sep 17 00:00:00 2001 From: Jai A P <78354625+Jai-JAP@users.noreply.github.com> Date: Fri, 31 Dec 2021 17:05:00 +0530 Subject: [PATCH] Update quickget --- quickget | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index d4db17a..cff4832 100755 --- a/quickget +++ b/quickget @@ -719,13 +719,12 @@ function get_alpine() { else BRANCH="v${RELEASE}" fi - VERSION=$(wget -qO- 'https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml' \ - | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') + MANIFESTURL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml" + VERSION=$(wget -qO- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') ISO="alpine-virt-${VERSION}-x86_64.iso" URL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/${ISO}" web_get "${URL}" "${VM_PATH}" - HASH=$(wget -qO- 'https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml' \ - | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') + HASH=$(wget -qO- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" }