Refactor Debian support to enable past releases

This commit is contained in:
Martin Wimpress 2022-02-21 20:07:58 +00:00
parent 614ea2f4c3
commit 6b54c58173
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3

View File

@ -248,7 +248,8 @@ function releases_cachyos() {
}
function releases_debian() {
echo 11.2.0
echo 10.11.0 \
11.2.0
}
function editions_debian() {
@ -819,12 +820,17 @@ function get_debian() {
local EDITION=""
local HASH=""
local ISO=""
local URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid"
local URL=""
if [ -n "${1}" ]; then
EDITION="${1}"
fi
case ${RELEASE} in
11.2.0) URL="https://cdimage.debian.org/debian-cd/${RELEASE}-live/amd64/iso-hybrid";;
*) URL="https://cdimage.debian.org/cdimage/archive/${RELEASE}-live/amd64/iso-hybrid/"
esac
ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso"
HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1)
web_get "${URL}/${ISO}" "${VM_PATH}"