From 584c855ec3ce6b6f64e48224b09eb535cdb428a8 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 27 Oct 2021 16:32:11 +0100 Subject: [PATCH] Add Downloader field to quickget This will inform frontend GUIs what download mechanism will be used to get the requested OS. --- quickget | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index fef94d1..77052ab 100755 --- a/quickget +++ b/quickget @@ -77,11 +77,12 @@ function list_json() { function list_csv() { local DISPLAY_NAME + local DOWNLOADER local FUNC local LANG local OS local RELEASE - echo "Display Name,OS,Release,Option" + echo "Display Name,OS,Release,Option,Downloader" for OS in $(os_support); do DISPLAY_NAME="$(pretty_name "${OS}")" if [[ "${OS}" == *"ubuntu"* ]]; then @@ -93,16 +94,27 @@ function list_csv() { fi for RELEASE in $("releases_${FUNC}"); do + + if [ "${OS}" == "macos" ]; then + DOWNLOADER="macrecovery" + elif [ "${OS}" == "ubuntu" ] && [ ${RELEASE} == "canary" ]; then + DOWNLOADER="zsync" + elif [[ "${OS}" == *"ubuntu"* ]] && [ ${RELEASE} == "devel" ]; then + DOWNLOADER="zsync" + else + DOWNLOADER="wget" + fi + if [ "${OS}" == "windows" ]; then for LANG in "${LANGS[@]}"; do - echo "${DISPLAY_NAME},${OS},${RELEASE},${LANG}" + echo "${DISPLAY_NAME},${OS},${RELEASE},${LANG},${DOWNLOADER}" done elif [ "${OS}" == "popos" ]; then for DRIVER in intel nvidia; do - echo "${DISPLAY_NAME},${OS},${RELEASE},${DRIVER}" + echo "${DISPLAY_NAME},${OS},${RELEASE},${DRIVER},${DOWNLOADER}" done else - echo "${DISPLAY_NAME},${OS},${RELEASE}," + echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER}" fi done done