From c5ec090970f049ad60f2b7939e08bd92a0d333b3 Mon Sep 17 00:00:00 2001 From: zen0bit Date: Sun, 21 Apr 2024 04:05:52 +0200 Subject: [PATCH] fix: Readd renamed error_not_supported_os function, cleanup --- quickget | 24 +++++++----------------- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/quickget b/quickget index 3240303..1a06a45 100755 --- a/quickget +++ b/quickget @@ -171,12 +171,6 @@ os_path_error() { exit 1 } -os_not_supported() { - echo -e "ERROR! ${OS} is not a supported OS.\n" - os_support | fold -s -w "$(tput cols)" - exit 1 -} - os_supported() { if [[ ! " $(os_support) " =~ " ${OS} " ]]; then os_not_supported @@ -221,6 +215,12 @@ os_error_release() { exit 1 } +function error_not_supported_os() { + echo -e "ERROR! ${OS} is not a supported OS.\n" + os_support | fold -s -w "$(tput cols)" + exit 1 +} + os_supported_edition() { if [[ ! " ${EDITIONS[*]} " =~ " ${EDITION} " ]]; then echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n" @@ -3610,12 +3610,6 @@ os_error() { exit 1 } -os_not_supported() { - echo -e "ERROR! ${OS} is not a supported OS.\n" - os_support | fold -s -w "$(tput cols)" - exit 1 -} - os_path_error() { echo 'ERROR! You must specify path.' os_error @@ -3693,11 +3687,7 @@ else exit 1 fi -if [[ ! " $(os_support) " =~ " ${OS} " ]]; then - echo -e "ERROR! ${OS} is not a supported OS.\n" - os_support - exit 1 -fi +os_supported help_message() { #shellcheck disable=SC2016