From 73945186021cfced1a32f1bc5ce117a41c938178 Mon Sep 17 00:00:00 2001 From: zen0bit Date: Sun, 14 Apr 2024 05:41:36 +0200 Subject: [PATCH] feat: Add function to show error message if OS not specified --- quickget | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/quickget b/quickget index cc5b987..cdcf167 100755 --- a/quickget +++ b/quickget @@ -3443,6 +3443,14 @@ fi LANGS=() +os_error() { + echo "ERROR! You must specify an operating system." + echo "- Supported Operating Systems:" + os_support | fold -s -w "$(tput cols)" + echo -e "\nTo see all possible arguments, use:\n quickget -h or quickget --help" + exit 1 +} + if [ -n "${1}" ]; then OS="${1,,}" if [ "${OS}" == "list" ] || [ "${OS}" == "list_csv" ]; then