From 1f084009df3f14ef0c85ae0c4eccd3834dc16ad0 Mon Sep 17 00:00:00 2001 From: zen0bit Date: Sun, 21 Apr 2024 08:49:40 +0200 Subject: [PATCH] fix: Readd renamed error_not_supported_release function, clean up --- quickget | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/quickget b/quickget index b5a99a9..f0e65be 100755 --- a/quickget +++ b/quickget @@ -177,15 +177,6 @@ os_supported() { fi } -os_supported_release() { - if [[ ! " ${RELEASES[*]} " =~ " ${RELEASE} " ]]; then - echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release." - echo -n 'Supported releases: ' - "releases_${OS}" - exit 1 - fi -} - os_error_release() { echo 'ERROR! You must specify a release.' case ${OS} in @@ -221,6 +212,15 @@ function error_not_supported_os() { exit 1 } +function error_not_supported_release() { + if [[ ! " ${RELEASES[*]} " =~ " ${RELEASE} " ]]; then + echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release." + echo -n 'Supported releases: ' + "releases_${OS}" + exit 1 + fi +} + function error_not_supported_edition() { if [[ ! " ${EDITIONS[*]} " =~ " ${EDITION} " ]]; then echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n" @@ -280,7 +280,7 @@ function validate_release() { *) RELEASE_GENERATOR="${1}";; esac RELEASES=$(${RELEASE_GENERATOR}) - os_supported_release + error_not_supported_release } function list_json() { @@ -3546,15 +3546,6 @@ fi LANGS=() -os_supported_release() { - if [[ ! " ${RELEASES[*]} " =~ " ${RELEASE} " ]]; then - echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release." - echo -n 'Supported releases: ' - "releases_${OS}" - exit 1 - fi -} - os_error_edition() { echo -en "ERROR! You must specify an edition.\n - Editions: " #TODO ERROR here