|
|
@ -36,6 +36,7 @@ function pretty_name() { |
|
|
|
SIMPLE_NAME="${1}" |
|
|
|
SIMPLE_NAME="${1}" |
|
|
|
case ${SIMPLE_NAME} in |
|
|
|
case ${SIMPLE_NAME} in |
|
|
|
alma) PRETTY_NAME="Alma Linux";; |
|
|
|
alma) PRETTY_NAME="Alma Linux";; |
|
|
|
|
|
|
|
alpine) PRETTY_NAME="Alpine Linux";; |
|
|
|
android) PRETTY_NAME="Android x86";; |
|
|
|
android) PRETTY_NAME="Android x86";; |
|
|
|
archlinux) PRETTY_NAME="Arch Linux";; |
|
|
|
archlinux) PRETTY_NAME="Arch Linux";; |
|
|
|
arcolinux) PRETTY_NAME="Arco Linux";; |
|
|
|
arcolinux) PRETTY_NAME="Arco Linux";; |
|
|
@ -163,6 +164,7 @@ function list_csv() { |
|
|
|
|
|
|
|
|
|
|
|
function os_support() { |
|
|
|
function os_support() { |
|
|
|
echo alma \ |
|
|
|
echo alma \ |
|
|
|
|
|
|
|
alpine \ |
|
|
|
android \ |
|
|
|
android \ |
|
|
|
archlinux \ |
|
|
|
archlinux \ |
|
|
|
arcolinux \ |
|
|
|
arcolinux \ |
|
|
@ -206,6 +208,14 @@ function releases_alma() { |
|
|
|
8.5 |
|
|
|
8.5 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function releases_alpine() { |
|
|
|
|
|
|
|
echo latest \ |
|
|
|
|
|
|
|
3.12 \ |
|
|
|
|
|
|
|
3.13 \ |
|
|
|
|
|
|
|
3.14 \ |
|
|
|
|
|
|
|
3.15 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function releases_android() { |
|
|
|
function releases_android() { |
|
|
|
echo 9.0 \ |
|
|
|
echo 9.0 \ |
|
|
|
8.1 \ |
|
|
|
8.1 \ |
|
|
@ -526,6 +536,9 @@ function make_vm_config() { |
|
|
|
if [ "${OS}" == "alma" ]; then |
|
|
|
if [ "${OS}" == "alma" ]; then |
|
|
|
GUEST="linux" |
|
|
|
GUEST="linux" |
|
|
|
IMAGE_TYPE="iso" |
|
|
|
IMAGE_TYPE="iso" |
|
|
|
|
|
|
|
elif [ "${OS}" == "alpine" ]; then |
|
|
|
|
|
|
|
GUEST="linux" |
|
|
|
|
|
|
|
IMAGE_TYPE="iso" |
|
|
|
elif [ "${OS}" == "android" ]; then |
|
|
|
elif [ "${OS}" == "android" ]; then |
|
|
|
GUEST="linux" |
|
|
|
GUEST="linux" |
|
|
|
IMAGE_TYPE="iso" |
|
|
|
IMAGE_TYPE="iso" |
|
|
@ -717,6 +730,30 @@ function get_alma() { |
|
|
|
check_hash "${ISO}" "${HASH}" |
|
|
|
check_hash "${ISO}" "${HASH}" |
|
|
|
make_vm_config "${ISO}" |
|
|
|
make_vm_config "${ISO}" |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function get_alpine() { |
|
|
|
|
|
|
|
local HASH="" |
|
|
|
|
|
|
|
local ISO="" |
|
|
|
|
|
|
|
local URL="" |
|
|
|
|
|
|
|
local VERSION="" |
|
|
|
|
|
|
|
local BRANCH="" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
validate_release "releases_alpine" |
|
|
|
|
|
|
|
if [[ "${RELEASE}" == "latest" ]]; then |
|
|
|
|
|
|
|
BRANCH="latest-stable" |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
BRANCH="v${RELEASE}" |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
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- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}') |
|
|
|
|
|
|
|
check_hash "${ISO}" "${HASH}" |
|
|
|
|
|
|
|
make_vm_config "${ISO}" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function get_archlinux() { |
|
|
|
function get_archlinux() { |
|
|
|
local HASH="" |
|
|
|
local HASH="" |
|
|
|
local ISO="" |
|
|
|
local ISO="" |
|
|
@ -1678,6 +1715,8 @@ if [ -n "${2}" ]; then |
|
|
|
fi |
|
|
|
fi |
|
|
|
VM_PATH="${OS}-${RELEASE}-${ISOTYPE}" |
|
|
|
VM_PATH="${OS}-${RELEASE}-${ISOTYPE}" |
|
|
|
get_alma "${ISOTYPE}" |
|
|
|
get_alma "${ISOTYPE}" |
|
|
|
|
|
|
|
elif [ "${OS}" == "alpine" ]; then |
|
|
|
|
|
|
|
get_alpine |
|
|
|
elif [ "${OS}" == "android" ]; then |
|
|
|
elif [ "${OS}" == "android" ]; then |
|
|
|
get_android |
|
|
|
get_android |
|
|
|
elif [ "${OS}" == "archlinux" ]; then |
|
|
|
elif [ "${OS}" == "archlinux" ]; then |
|
|
@ -1789,6 +1828,8 @@ else |
|
|
|
echo -n "ERROR! You must specify a release: " |
|
|
|
echo -n "ERROR! You must specify a release: " |
|
|
|
if [ "${OS}" == "alma" ]; then |
|
|
|
if [ "${OS}" == "alma" ]; then |
|
|
|
releases_alma |
|
|
|
releases_alma |
|
|
|
|
|
|
|
elif [ "${OS}" == "alpine" ]; then |
|
|
|
|
|
|
|
releases_alpine |
|
|
|
elif [ "${OS}" == "android" ]; then |
|
|
|
elif [ "${OS}" == "android" ]; then |
|
|
|
releases_android |
|
|
|
releases_android |
|
|
|
elif [ "${OS}" == "archlinux" ]; then |
|
|
|
elif [ "${OS}" == "archlinux" ]; then |
|
|
|