From b2d09389e8776821210c9e203055f0c43cb033f3 Mon Sep 17 00:00:00 2001 From: Gordon Schulz Date: Mon, 4 Nov 2024 16:53:33 +0100 Subject: [PATCH 1/2] fix(fedora): Check whether the link value contains an actual .iso file Also remove the SHA256 requirement. Fedora provides these for all links now. Fixes #1502 --- quickget | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index 07d2238960..db09cfe97d 100755 --- a/quickget +++ b/quickget @@ -1820,10 +1820,10 @@ function get_fedora() { RELEASE="${RELEASE/_/ }" fi - + # shellcheck disable=SC2086 - JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'" and .sha256 != null)') + JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'" and (.link | test(".*\\.iso$")))') URL=$(echo "${JSON}" | jq -r '.link' | head -n1) HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1) echo "${URL} ${HASH}" From 29fb0e13203b70fd8807bb9fc77d03f73f0d7e2b Mon Sep 17 00:00:00 2001 From: Liam <33645555+lj3954@users.noreply.github.com> Date: Fri, 8 Nov 2024 00:02:32 -0800 Subject: [PATCH 2/2] refactor(fedora): Use more concise function to filter out non-ISO files --- quickget | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickget b/quickget index db09cfe97d..e051c8b8d3 100755 --- a/quickget +++ b/quickget @@ -1823,7 +1823,7 @@ function get_fedora() { # shellcheck disable=SC2086 - JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'" and (.link | test(".*\\.iso$")))') + JSON=$(web_pipe "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'" and (.link | endswith(".iso")))') URL=$(echo "${JSON}" | jq -r '.link' | head -n1) HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1) echo "${URL} ${HASH}"