fix(quickget): disable shellcheck SC2207 warnings for ubuntu releases

https://www.shellcheck.net/wiki/SC2207
This commit is contained in:
Martin Wimpress 2024-05-07 11:33:53 +01:00 committed by Martin Wimpress
parent 7cfdfd0cec
commit 7eac685f25
1 changed files with 5 additions and 2 deletions

View File

@ -1108,8 +1108,10 @@ function releases_ubuntu() {
local SUPPORTED_VERSIONS=() local SUPPORTED_VERSIONS=()
local EOL_VERSIONS=() local EOL_VERSIONS=()
VERSION_DATA="$(IFS=$'\n' web_pipe https://api.launchpad.net/devel/ubuntu/series | jq -r '.entries[]')" VERSION_DATA="$(IFS=$'\n' web_pipe https://api.launchpad.net/devel/ubuntu/series | jq -r '.entries[]')"
SUPPORTED_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Supported" or .status=="Current Stable Release") | .version' <<<${VERSION_DATA} | sort)) # shellcheck disable=SC2207
EOL_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Obsolete") | .version' <<<${VERSION_DATA} | sort)) SUPPORTED_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Supported" or .status=="Current Stable Release") | .version' <<<"${VERSION_DATA}" | sort))
# shellcheck disable=SC2207
EOL_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Obsolete") | .version' <<<"${VERSION_DATA}" | sort))
case "${OS}" in case "${OS}" in
ubuntu) ubuntu)
echo "${SUPPORTED_VERSIONS[@]}" daily-live "${EOL_VERSIONS[@]/#/eol-}";; echo "${SUPPORTED_VERSIONS[@]}" daily-live "${EOL_VERSIONS[@]/#/eol-}";;
@ -1127,6 +1129,7 @@ function releases_ubuntu() {
function releases_ubuntu-server() { function releases_ubuntu-server() {
local ALL_VERSIONS=() local ALL_VERSIONS=()
# shellcheck disable=SC2207
ALL_VERSIONS=($(IFS=$'\n' web_pipe http://releases.ubuntu.com/streams/v1/com.ubuntu.releases:ubuntu-server.json | jq -r '.products[] | select(.arch=="amd64") | .version' | sort -rV)) ALL_VERSIONS=($(IFS=$'\n' web_pipe http://releases.ubuntu.com/streams/v1/com.ubuntu.releases:ubuntu-server.json | jq -r '.products[] | select(.arch=="amd64") | .version' | sort -rV))
echo daily-live "${ALL_VERSIONS[@]}" echo daily-live "${ALL_VERSIONS[@]}"
} }