From 966ccd7d66d4cbf0055c7d3ef2641e291e79cdb9 Mon Sep 17 00:00:00 2001 From: zen0bit Date: Sat, 4 May 2024 00:01:07 +0200 Subject: [PATCH] Lint quickget --- quickget | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/quickget b/quickget index f5e597ad38..15deaaf28e 100755 --- a/quickget +++ b/quickget @@ -147,7 +147,7 @@ function os_info() { function show_os_info() { while getopts ":12345" opt; do case $opt in - 1|2|3|4|5) os_info "${2}" | cut -d'|' -f${opt};; + 1|2|3|4|5) os_info "${2}" | cut -d'|' -f"${opt}";; *) error_not_supported_argument;; esac done @@ -158,7 +158,7 @@ PRETTY_NAME=$(show_os_info -1 "${OS}") # Just in case quickget want use it in future # shellcheck disable=SC2005,SC2317 function os_homepage(){ - echo $(show_os_info -4 "${1}") + echo "$(show_os_info -4 "${1}")" } function error_specify_os() { @@ -1249,7 +1249,7 @@ function web_get() { fi if [[ ${OS} != windows && ${OS} != macos && ${OS} != windows-server ]]; then - echo Downloading ${PRETTY_NAME} ${RELEASE} ${EDITION:+ $EDITION} + echo Downloading "${PRETTY_NAME}" "${RELEASE}" "${EDITION:+ $EDITION}" echo "- URL: ${URL}" fi @@ -1316,7 +1316,7 @@ function zsync_get() { echo "ERROR! Unable to create directory ${DIR}" exit 1 fi - echo -e Downloading ${PRETTY_NAME} ${RELEASE} ${EDITION+ ${EDITION}} from ${URL}'\n' + echo -e Downloading "${PRETTY_NAME} ${RELEASE} ${EDITION+ ${EDITION}} from ${URL}\n" # Only force http for zsync - not earlier because we might fall through here if ! zsync "${URL/https/http}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then echo "ERROR! Failed to download ${URL/https/http}.zsync" @@ -2131,9 +2131,9 @@ function get_manjaro() { [[ ${RELEASE} != "sway" ]] && MANIFEST="$(web_pipe https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)" [[ ${EDITION} == "minimal" && ${TYPE} != "sway" ]] && EDITION=".minimal" || EDITION="" if [[ ${RELEASE} != "sway" ]]; then - URL="$(echo ${MANIFEST} | jq -r .${TYPE}.${RELEASE}${EDITION}.image)" + URL="$(echo "${MANIFEST}" | jq -r .${TYPE}.${RELEASE}${EDITION}.image)" else - URL=$(echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url') + URL=$(echo "${MANIFEST}" | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url') fi HASH=$(web_pipe "${URL}.sha512" | cut_1) echo "${URL} ${HASH}"