From e1a46b9b5a2bdc55309540dbc2e7e8b0b5c4011a Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 7 May 2024 11:10:24 +0100 Subject: [PATCH] refactor(quickget): remove single use function error_not_supported_os() --- quickget | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/quickget b/quickget index e014243..fd56df3 100755 --- a/quickget +++ b/quickget @@ -148,7 +148,9 @@ function error_specify_os() { function os_supported() { if [[ ! "$(os_support)" =~ ${OS} ]]; then - error_not_supported_os + echo -e "ERROR! ${OS} is not a supported OS.\n" + os_support | fold -s -w "$(tput cols)" + exit 1 fi } @@ -195,12 +197,6 @@ function error_specify_path() { 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 -} - function error_not_supported_release() { if [[ ! "${RELEASES[*]}" =~ ${RELEASE} ]]; then echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."