From 765355c4d30d8a3a962a501fb702699cd1ba5e27 Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Fri, 19 Nov 2021 23:39:25 +0000 Subject: [PATCH] Added option support for debian nonfree --- quickget | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index b3a8430..b5a5582 100755 --- a/quickget +++ b/quickget @@ -141,6 +141,10 @@ function list_csv() { for OPTION in intel nvidia; do echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" done + elif [ "${OS}" == "debian" ]; then + for OPTION in standard nonfree; do + echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}" + done else echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}" fi @@ -201,6 +205,7 @@ function releases_archlinux() { } # later refactor these DE variants like languages and avoid the arch ? +# all these are available with a "nonfree" option too function releases_debian() { echo 11.1.0-amd64-cinnamon \ 11.1.0-amd64-gnome \ @@ -851,9 +856,20 @@ function get_debian() { local ISO="" local URL="" local HASHLINE="" + local FREEDOM="" + validate_release "releases_debian" - URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid" + + if [ "${1}" == "nonfree" ]; then + RELEASE="${RELEASE}+nonfree" + fi + case $RELEASE in + *+nonfree) URL="http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid" ;; + *) URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid";; + esac + + HASHLINE=$(wget -q -O- ${URL}/SHA512SUMS |grep ${RELEASE}.iso) ISO="$(echo ${HASHLINE} | awk '{print $NF}' )" HASH=$(echo ${HASHLINE} | cut -d\ -f1) @@ -1422,7 +1438,21 @@ if [ -n "${2}" ]; then elif [ "${OS}" == "archlinux" ]; then get_archlinux elif [ "${OS}" == "debian" ]; then - get_debian + if [ -n "${3}" ]; then + FREEDOM="${3}" + FREEDOMS=(standard nonfree) + if [[ ! ${FREEDOMS[*]} =~ ${FREEDOM} ]]; then + echo "ERROR! ${FREEDOM} is not a supported freedom:" + for DRIVER in "${FREEDOMS[@]}"; do + echo "${FREEDOM}" + done + exit 1 + fi + else + FREEDOM="standard" + fi + VM_PATH="${OS}-${RELEASE}-${FREEDOM}" + get_debian "${FREEDOM}" elif [ "${OS}" == "elementary" ]; then get_elementary elif [ "${OS}" == "macos" ]; then