# Template file for 'fedora-linux' OSNAME="fedora-linux" PRETTY="Fedora" LOGO=" " ICON="fedora-linux.svg" CATEGORY="Beginner" BASEDOF="-" HOMEPAGE="https://www.fedoraproject.org" DESCRIPTION="Innovative platform for hardware, clouds, and containers, built with love by you" CREDENTIALS="-" GPG="" RSS="" DW="" function releases_() { # The feed retains beta entries after the corresponding final release. web_pipe "https://getfedora.org/releases.json" | jq -r ' map(select(.link | endswith(".iso"))) | map(.version) | unique as $versions | $versions[] | select((split(" ")[0]) as $major | (contains(" ") | not) or ($versions | index($major) | not)) | gsub(" "; "_")' | sort -Vr } function editions_() { local QEMU_ARCH QEMU_ARCH=$(_qarch_to_upstream "${ARCH:-amd64}") web_pipe "https://getfedora.org/releases.json" | jq -r \ --arg arch "${QEMU_ARCH}" --arg release "${RELEASE/_/ }" ' map(select(.arch == $arch and ($release == "" or .version == $release) and (.link | endswith(".iso")) and .variant != "Labs" and .variant != "IoT" and .variant != "Container" and .variant != "Cloud" and .variant != "Everything" and .subvariant != "Security" and .subvariant != "Server_KVM" and .subvariant != "SoaS")) | map(.subvariant) | unique | .[]' } function arch_() { echo amd64 arm64 ppc64el s390x } function get_() { local HASH="" local ISO="" local JSON="" local URL="" local QEMU_ARCH QEMU_ARCH=$(_qarch_to_upstream "${ARCH:-amd64}") # Subvariants can move out of Spins (KDE and Atomic desktops did). # Select the published ISO directly instead of guessing its variant. JSON=$(web_pipe "https://getfedora.org/releases.json" | jq \ --arg edition "${EDITION}" --arg arch "${QEMU_ARCH}" --arg release "${RELEASE/_/ }" \ '.[] | select(.subvariant == $edition and .arch == $arch 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}" }