Refactor Debian support

Drop non-free support, that is irrelevant in a VM. releases_debian() lists actual releases and get_debian() support the different desktop edition, which are exposed in the csv/json lists.
pull/373/head
Martin Wimpress 3 years ago
parent da3fe3b8f3
commit 2d72601fbf
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 58
      quickget

@ -164,14 +164,14 @@ function list_csv() {
for OPTION in "${LANGS[@]}"; do for OPTION in "${LANGS[@]}"; do
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
done done
elif [ "${OS}" == "debian" ]; then
for OPTION in cinnamon gnome kde lxde lxqt mate standard xfce; do
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
done
elif [ "${OS}" == "popos" ]; then elif [ "${OS}" == "popos" ]; then
for OPTION in intel nvidia; do for OPTION in intel nvidia; do
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
done done
elif [ "${OS}" == "debian" ]; then
for OPTION in standard nonfree; do
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
done
elif [ "${OS}" == "alma" ]; then elif [ "${OS}" == "alma" ]; then
for OPTION in minimal dvd; do for OPTION in minimal dvd; do
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
@ -275,17 +275,8 @@ function releases_arcolinux() {
echo latest echo latest
} }
# later refactor these DE variants like languages and avoid the arch ?
# all these are available with a "nonfree" option too
function releases_debian() { function releases_debian() {
echo cinnamon \ echo 11.2.0
gnome \
kde \
lxde \
lxqt \
mate \
standard \
xfce
} }
function releases_cachyos() { function releases_cachyos() {
@ -855,25 +846,18 @@ function get_cachyos() {
} }
function get_debian() { function get_debian() {
local DESKTOP="standard"
local HASH="" local HASH=""
local HASHLINE=""
local ISO="" local ISO=""
local URL="" local URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid"
validate_release "releases_debian" if [ -n "${1}" ]; then
DESKTOP="${1}"
if [ "${1}" == "nonfree" ]; then
RELEASE="${RELEASE}+nonfree"
fi fi
case ${RELEASE} in validate_release "releases_debian"
*+nonfree) URL="http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid";; ISO="debian-live-${RELEASE}-amd64-${DESKTOP}.iso"
*) URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid";; HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1)
esac
HASHLINE=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${RELEASE}.iso")
ISO="$(echo "${HASHLINE}" | awk '{print $NF}')"
HASH=$(echo "${HASHLINE}" | cut -d'\' -f1)
web_get "${URL}/${ISO}" "${VM_PATH}" web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}" check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}" make_vm_config "${ISO}"
@ -1948,20 +1932,20 @@ if [ -n "${2}" ]; then
get_void get_void
elif [ "${OS}" == "debian" ]; then elif [ "${OS}" == "debian" ]; then
if [ -n "${3}" ]; then if [ -n "${3}" ]; then
FREEDOM="${3}" DESKTOP="${3}"
FREEDOMS=(standard nonfree) DESKTOPS=(cinnamon gnome kde lxde lxqt mate standard xfce)
if [[ ! ${FREEDOMS[*]} =~ ${FREEDOM} ]]; then if [[ ! ${DESKTOPS[*]} =~ ${DESKTOP} ]]; then
echo "ERROR! ${FREEDOM} is not a supported freedom:" echo "ERROR! ${DESKTOP} is not a supported Desktop Environment:"
for DRIVER in "${FREEDOMS[@]}"; do for DESKTOP in "${DESKTOPS[@]}"; do
echo "${FREEDOM}" echo "${DESKTOP}"
done done
exit 1 exit 1
fi fi
else else
FREEDOM="standard" DESKTOP="standard"
fi fi
VM_PATH="${OS}-${RELEASE}-${FREEDOM}" VM_PATH="${OS}-${RELEASE}-${DESKTOP}"
get_debian "${FREEDOM}" get_debian "${DESKTOP}"
elif [ "${OS}" == "devuan" ]; then elif [ "${OS}" == "devuan" ]; then
get_devuan get_devuan
elif [ "${OS}" == "elementary" ]; then elif [ "${OS}" == "elementary" ]; then

Loading…
Cancel
Save