From 46b981728dfee5b7d4fb47f390f9c2bf4d5e7f8f Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 7 May 2024 11:09:36 +0100 Subject: [PATCH] fix(quickget): correct shellcheck SC2076 warnings https://www.shellcheck.net/wiki/SC2076 --- quickget | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quickget b/quickget index fd518d0..e014243 100755 --- a/quickget +++ b/quickget @@ -147,7 +147,7 @@ function error_specify_os() { } function os_supported() { - if [[ ! " $(os_support) " =~ " ${OS} " ]]; then + if [[ ! "$(os_support)" =~ ${OS} ]]; then error_not_supported_os fi } @@ -202,7 +202,7 @@ function error_not_supported_os() { } function error_not_supported_release() { - if [[ ! " ${RELEASES[*]} " =~ " ${RELEASE} " ]]; then + if [[ ! "${RELEASES[*]}" =~ ${RELEASE} ]]; then echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release." echo -n 'Supported releases: ' "releases_${OS}" @@ -211,7 +211,7 @@ function error_not_supported_release() { } function error_not_supported_edition() { - if [[ ! " ${EDITIONS[*]} " =~ " ${EDITION} " ]]; then + if [[ ! "${EDITIONS[*]}" =~ ${EDITION} ]]; then echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n" echo -n ' - Editions: ' for EDITION in "${EDITIONS[@]}"; do @@ -3564,7 +3564,7 @@ if [ -n "${2}" ]; then "languages_${OS}" if [ -n "${3}" ]; then LANG="${3}" - if [[ ! ${LANGS[*]} =~ "${LANG}" ]]; then + if [[ ! "${LANGS[*]}" =~ ${LANG} ]]; then error_not_supported_lang fi VM_PATH="$(echo "${OS}-${RELEASE}-${LANG// /-}" | tr -d '()')"