refactor: update alpine to use web_pipe()

This commit is contained in:
Martin Wimpress 2024-04-19 14:08:53 +01:00 committed by Martin Wimpress
parent b0a439ceb7
commit 85936d8128
1 changed files with 2 additions and 2 deletions

View File

@ -1755,9 +1755,9 @@ function get_alpine() {
latest) URL="https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64";; latest) URL="https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64";;
*) URL="https://dl-cdn.alpinelinux.org/alpine/v${RELEASE}/releases/x86_64";; *) URL="https://dl-cdn.alpinelinux.org/alpine/v${RELEASE}/releases/x86_64";;
esac esac
VERSION=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') VERSION=$(web_pipe "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}')
ISO="alpine-virt-${VERSION}-x86_64.iso" ISO="alpine-virt-${VERSION}-x86_64.iso"
HASH=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') HASH=$(web_pipe "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}')
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }