Refactor Alma Linux support to add editions

This commit is contained in:
Martin Wimpress 2022-02-21 15:05:15 +00:00
parent 04e65d953a
commit a78ab882d3
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
1 changed files with 11 additions and 4 deletions

View File

@ -199,11 +199,15 @@ function os_support() {
}
function releases_alma() {
# consider flavours for boot and dvd as well as
echo 8.4 \
8.5
}
function editions_alma() {
echo minimal \
dvd
}
function releases_alpine() {
echo latest \
3.12 \
@ -748,14 +752,17 @@ function get_android() {
}
function get_alma() {
local EDITION=""
local HASH=""
local ISO=""
local ISOTYPE="minimal"
local URL=""
validate_release "releases_alma"
if [ -n "${1}" ]; then
EDITION="${1}"
fi
URL="http://lon.mirror.rackspace.com/almalinux/${RELEASE}/isos/x86_64/"
ISO="AlmaLinux-${RELEASE}-x86_64-${ISOTYPE}.iso"
ISO="AlmaLinux-${RELEASE}-x86_64-${EDITION}.iso"
HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep \("${ISO}" | cut -d'\' -f4)"
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"