From 344c7f93a53157c21b645dc847de24c078c8495b Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 21 Feb 2022 10:11:25 +0000 Subject: [PATCH] Make Windows LANGS consistent with other OS EDITIONS --- quickget | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/quickget b/quickget index 7cc2c8b..3bbc80d 100755 --- a/quickget +++ b/quickget @@ -449,6 +449,12 @@ function releases_void() { xfce-musl } +function releases_windows() { + echo 8 \ + 10 \ + 11 +} + function languages_windows() { LANGS=(Arabic "Brazilian Portuguese" @@ -490,13 +496,6 @@ function languages_windows() { Ukrainian) } - -function releases_windows() { - echo 8 \ - 10 \ - 11 -} - function releases_zorin() { echo 16core64 \ 16lite64 \ @@ -1884,7 +1883,7 @@ if [ -n "${2}" ]; then # If the OS has an editions_() function, use it. if [[ $(type -t "editions_${OS}") == function ]]; then - EDITIONS=($(editions_${OS})) + EDITIONS=("$(editions_"${OS}")") EDITION=${EDITIONS[0]} if [ -n "${3}" ]; then EDITION="${3}" @@ -1897,24 +1896,24 @@ if [ -n "${2}" ]; then fi fi VM_PATH="${OS}-${RELEASE}-${EDITION}" - get_${OS} "${EDITION}" + get_"${OS}" "${EDITION}" elif [[ "${OS}" == *"ubuntu"* ]]; then - get_ubuntu + get_ubuntu elif [ "${OS}" == "windows" ]; then - LANG_NAME="English International" + LANG="English International" if [ -n "${3}" ]; then - LANG_NAME="${3}" - if [[ ! ${LANGS[*]} =~ "${LANG_NAME}" ]]; then - echo -e "ERROR! ${LANG_NAME} is not a supported Windows language:\n" + EDITION="${3}" + if [[ ! ${LANGS[*]} =~ "${LANG}" ]]; then + echo -e "ERROR! ${LANG} is not a supported Windows language:\n" for LANG in "${LANGS[@]}"; do echo -n "${LANG} " done exit 1 fi fi - get_windows "${LANG_NAME}" + get_windows "${LANG}" else - get_"${OS}" + get_"${OS}" fi else echo -n "ERROR! You must specify a release: "