fix(quickget): correct shellcheck SC2076 warnings

https://www.shellcheck.net/wiki/SC2076
This commit is contained in:
Martin Wimpress 2024-05-07 11:09:36 +01:00 committed by Martin Wimpress
parent 805eae9bd5
commit 46b981728d
1 changed files with 4 additions and 4 deletions

View File

@ -147,7 +147,7 @@ function error_specify_os() {
} }
function os_supported() { function os_supported() {
if [[ ! " $(os_support) " =~ " ${OS} " ]]; then if [[ ! "$(os_support)" =~ ${OS} ]]; then
error_not_supported_os error_not_supported_os
fi fi
} }
@ -202,7 +202,7 @@ function error_not_supported_os() {
} }
function error_not_supported_release() { 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 -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
echo -n 'Supported releases: ' echo -n 'Supported releases: '
"releases_${OS}" "releases_${OS}"
@ -211,7 +211,7 @@ function error_not_supported_release() {
} }
function error_not_supported_edition() { 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 -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition\n"
echo -n ' - Editions: ' echo -n ' - Editions: '
for EDITION in "${EDITIONS[@]}"; do for EDITION in "${EDITIONS[@]}"; do
@ -3564,7 +3564,7 @@ if [ -n "${2}" ]; then
"languages_${OS}" "languages_${OS}"
if [ -n "${3}" ]; then if [ -n "${3}" ]; then
LANG="${3}" LANG="${3}"
if [[ ! ${LANGS[*]} =~ "${LANG}" ]]; then if [[ ! "${LANGS[*]}" =~ ${LANG} ]]; then
error_not_supported_lang error_not_supported_lang
fi fi
VM_PATH="$(echo "${OS}-${RELEASE}-${LANG// /-}" | tr -d '()')" VM_PATH="$(echo "${OS}-${RELEASE}-${LANG// /-}" | tr -d '()')"