Refactor get_alpine() to add create_vm() compatibility
This commit is contained in:
parent
7dc6572bdf
commit
4f5752bb0d
11
quickget
11
quickget
@ -685,20 +685,15 @@ function get_alpine() {
|
|||||||
local ISO=""
|
local ISO=""
|
||||||
local URL=""
|
local URL=""
|
||||||
local VERSION=""
|
local VERSION=""
|
||||||
local BRANCH=""
|
|
||||||
|
|
||||||
case ${RELEASE} in
|
case ${RELEASE} in
|
||||||
latest) BRANCH="latest-stable";;
|
latest) URL="https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64";;
|
||||||
*) BRANCH="v${RELEASE}";;
|
*) URL="https://dl-cdn.alpinelinux.org/alpine/v${RELEASE}/releases/x86_64";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
URL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64"
|
|
||||||
VERSION=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}')
|
VERSION=$(wget -qO- "${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"
|
||||||
web_get "${URL}/${ISO}" "${VM_PATH}"
|
|
||||||
HASH=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}')
|
HASH=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}')
|
||||||
check_hash "${ISO}" "${HASH}"
|
echo "${URL}/${ISO} ${HASH}"
|
||||||
make_vm_config "${ISO}"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_android() {
|
function get_android() {
|
||||||
|
Loading…
Reference in New Issue
Block a user