mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2026-12-06 04:43:46 +00:00
131 lines
4.3 KiB
Text
131 lines
4.3 KiB
Text
# Template file for 'fedora-linux'
|
|
OSNAME="fedora-linux"
|
|
PRETTY="Fedora"
|
|
LOGO=" "
|
|
ICON="fedora-linux.svg"
|
|
ICON_ONLINE=""
|
|
CATEGORY="Beginner"
|
|
BASEDOF="-"
|
|
DESCRIPTION="Innovative platform for hardware, clouds, and containers, built with love by you"
|
|
HOMEPAGE="https://www.fedoraproject.org"
|
|
CREDENTIALS="-"
|
|
GPG=""
|
|
RSS=""
|
|
DW=""
|
|
MAGNET=""
|
|
MAGNET_PREFERRED=""
|
|
TORRENT=""
|
|
CHAT=""
|
|
|
|
RELEASES="45 44 43"
|
|
EDITIONS="Budgie Budgie-Atomic Cinnamon COSMIC COSMIC-Atomic i3 KDE KDE_Mobile Kinoite LXDE LXQt Mate MiracleWM Onyx Sericea Server Silverblue Sway Sway-Atomic Workstation Xfce"
|
|
EDITIONS_LIST="Budgie
|
|
Budgie-Atomic
|
|
Cinnamon
|
|
COSMIC
|
|
COSMIC-Atomic
|
|
i3
|
|
KDE
|
|
KDE_Mobile
|
|
Kinoite
|
|
LXDE
|
|
LXQt
|
|
Mate
|
|
MiracleWM
|
|
Onyx
|
|
Sericea
|
|
Server
|
|
Silverblue
|
|
Sway
|
|
Sway-Atomic
|
|
Workstation
|
|
Xfce"
|
|
QEMU_ARCH="amd64 arm64 ppc64el s390x"
|
|
|
|
EDITIONS_arm64="COSMIC COSMIC-Atomic i3 KDE KDE_Mobile Kinoite LXQt MiracleWM Server Silverblue Workstation Xfce"
|
|
EDITIONS_ppc64el="KDE Server Workstation"
|
|
EDITIONS_s390x="Server"
|
|
|
|
_release_editions_() {
|
|
case "${1:-}" in
|
|
"ppc64el|45") echo "KDE Server" ;;
|
|
"ppc64el|44") echo "KDE Server Workstation" ;;
|
|
"ppc64el|43") echo "KDE Server Workstation" ;;
|
|
"amd64|43") echo "Budgie Cinnamon COSMIC COSMIC-Atomic i3 KDE KDE_Mobile Kinoite LXDE LXQt Mate MiracleWM Onyx Sericea Server Silverblue Sway Workstation Xfce" ;;
|
|
"amd64|45") echo "Budgie Budgie-Atomic Cinnamon COSMIC COSMIC-Atomic i3 KDE KDE_Mobile Kinoite LXDE LXQt Mate MiracleWM Server Silverblue Sway Sway-Atomic Workstation Xfce" ;;
|
|
"amd64|44") echo "Budgie Cinnamon COSMIC COSMIC-Atomic i3 KDE KDE_Mobile Kinoite LXDE LXQt Mate MiracleWM Onyx Sericea Server Silverblue Sway Workstation Xfce" ;;
|
|
"arm64|45") echo "COSMIC COSMIC-Atomic i3 KDE KDE_Mobile Kinoite LXQt MiracleWM Server Silverblue Workstation Xfce" ;;
|
|
"arm64|44") echo "COSMIC COSMIC-Atomic i3 KDE KDE_Mobile Kinoite LXQt MiracleWM Server Silverblue Workstation Xfce" ;;
|
|
"arm64|43") echo "COSMIC COSMIC-Atomic i3 KDE KDE_Mobile Kinoite LXQt MiracleWM Server Silverblue Workstation Xfce" ;;
|
|
"s390x|44") echo "Server" ;;
|
|
"s390x|45") echo "Server" ;;
|
|
"s390x|43") echo "Server" ;;
|
|
*) return 1 ;;
|
|
esac
|
|
}
|
|
|
|
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
|
|
}
|
|
|
|
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 | .[]'
|
|
}
|
|
|
|
arch_() {
|
|
echo amd64 arm64 ppc64el s390x
|
|
}
|
|
|
|
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}"
|
|
}
|
|
|
|
releases_() {
|
|
# Releases parsed at generation time — no network access needed.
|
|
echo "${RELEASES}"
|
|
}
|
|
editions_() {
|
|
# Editions parsed at generation time — no network access needed.
|
|
local _scoped=""
|
|
if [ -n "${RELEASE:-}" ] && declare -F _release_editions_ >/dev/null; then
|
|
_scoped=$(_release_editions_ "${ARCH:-}|${RELEASE}")
|
|
fi
|
|
if [ -n "${_scoped}" ]; then
|
|
echo "${_scoped}"
|
|
return 0
|
|
fi
|
|
local _per_arch="EDITIONS_${ARCH:-}"
|
|
if [ -n "${!_per_arch:-}" ]; then
|
|
echo "${!_per_arch}"
|
|
return 0
|
|
fi
|
|
echo "${EDITIONS:-}"
|
|
}
|