DistroHopper/public/gentoo-linux
2026-11-29 05:46:38 +01:00

79 lines
1.9 KiB
Text

# Template file for 'gentoo-linux'
OSNAME="gentoo-linux"
PRETTY="Gentoo Linux"
LOGO=""
ICON="gentoo-linux.svg"
ICON_ONLINE=""
CATEGORY="Advanced"
BASEDOF="Independent"
DESCRIPTION="A flexible, source-based Linux distribution"
HOMEPAGE="https://www.gentoo.org/"
CREDENTIALS="root:"
GPG=""
RSS=""
DW=""
MAGNET=""
MAGNET_PREFERRED=""
TORRENT=""
CHAT=""
RELEASES="latest"
EDITIONS="livegui minimal"
EDITIONS_LIST="livegui
minimal"
QEMU_ARCH="amd64"
releases_() {
echo latest
}
editions_() {
local MANIFEST=""
MANIFEST=$(web_pipe "https://distfiles.gentoo.org/releases/amd64/autobuilds/latest-iso.txt")
{
printf '%s\n' "${MANIFEST}" | grep -q '/install-amd64-minimal-' && echo minimal
printf '%s\n' "${MANIFEST}" | grep -q '/livegui-amd64-' && echo livegui
}
}
arch_() {
echo amd64
}
get_() {
local URL="https://distfiles.gentoo.org/releases/amd64/autobuilds"
local ISO_PATH=""
ISO_PATH=$(web_pipe "${URL}/latest-iso.txt" \
| awk -v edition="${EDITION}" '
$1 !~ /^#/ && edition == "minimal" && $1 ~ /\/install-amd64-minimal-/ {print $1; exit}
$1 !~ /^#/ && edition == "livegui" && $1 ~ /\/livegui-amd64-/ {print $1; exit}
')
[ -n "${ISO_PATH}" ] || return 1
local ISO="${ISO_PATH##*/}"
local HASH=""
HASH=$(web_pipe "${URL}/${ISO_PATH}.DIGESTS" \
| awk -v iso="${ISO}" '$0 == "# SHA512 HASH" {sha=1; next} /^#/ {sha=0} sha && $2 == iso {print $1; exit}')
echo "${URL}/${ISO_PATH} ${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:-}"
}