From b6e71f985ad162cb6bea67105137a0e3ac294dba Mon Sep 17 00:00:00 2001 From: zen0bit Date: Fri, 12 Apr 2024 18:06:55 +0200 Subject: [PATCH] feat: Add function to list supported OS with all releases and editions --- quickget | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/quickget b/quickget index 4a5564b..cc45754 100755 --- a/quickget +++ b/quickget @@ -363,6 +363,38 @@ function list_csv() { exit 0 } +list_supported() { + # output OS RELEASE EDITION (usefull for straight testing...) + local DL="" + local FUNC + local OPTION + local OS + + for OS in $(os_support); do + case ${OS} in + *ubuntu-server*) FUNC="ubuntu-server";; + *ubuntu*) FUNC="ubuntu";; + *) FUNC="${OS}";; + esac + for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases + # If the OS has an editions_() function, use it. + if [[ $(type -t "editions_${OS}") == function ]]; then + for OPTION in $(editions_"${OS}"); do + echo "${OS} ${RELEASE} ${OPTION}" + done + elif [[ "${OS}" == "windows"* ]]; then + "languages_${OS}" + for OPTION in "${LANGS[@]}"; do + echo "${OS} ${RELEASE} ${OPTION}" + done + else + echo "${OS} ${RELEASE}" + fi + done + done + exit 0 +} + function os_support() { echo alma \ alpine \