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

91 lines
2.3 KiB
Text

# Template file for 'void-linux'
OSNAME="void-linux"
PRETTY="Void Linux"
LOGO=" "
ICON="void-linux.svg"
ICON_ONLINE=""
CATEGORY="advanced"
BASEDOF="-"
DESCRIPTION="General purpose operating system. Its package system allows you to quickly install, update and remove software; software is provided in binary packages or can be built directly from sources"
HOMEPAGE="https://voidlinux.org"
CREDENTIALS="anon:voidlinux root:voidlinux"
GPG=""
RSS=""
DW=""
MAGNET=""
MAGNET_PREFERRED=""
TORRENT=""
CHAT=""
RELEASES="current"
EDITIONS="glibc musl xfce-glibc xfce-musl"
EDITIONS_LIST="glibc
musl
xfce-glibc
xfce-musl"
QEMU_ARCH="amd64 arm64 i686"
releases_() {
echo current
}
editions_() {
echo glibc musl xfce-glibc xfce-musl
}
arch_() {
echo "amd64 arm64 i686"
}
config_() {
# The i686 image needs legacy BIOS, not the launcher's default x86_64 UEFI.
if [ "${ARCH:-amd64}" == "i686" ]; then
echo 'boot="legacy"' >> "${CONF_FILE}"
fi
}
get_() {
local DATE="" HASH="" ISO="" VARIANT="" QEMU_ARCH=""
local URL="https://repo-default.voidlinux.org/live/current"
case "${EDITION}" in
glibc) VARIANT="base"; MUSL="";;
musl) VARIANT="base"; MUSL="musl-";;
xfce-glibc) VARIANT="xfce"; MUSL="";;
xfce-musl) VARIANT="xfce"; MUSL="musl-";;
esac
QEMU_ARCH=$(_qarch_to_upstream "${ARCH:-amd64}")
# Different parsing for i686 (date is in different position)
if [ "${ARCH}" == "i686" ]; then
DATE=$(web_pipe "$URL" | grep "^<a href=\"void-live-i686-" | tail -1 | sed 's/.*void-live-i686-\(.*\)-.*/\1/' | cut -d'-' -f1)
else
DATE=$(web_pipe "$URL" | grep -o "void-live-${QEMU_ARCH}-${MUSL}[0-9]\{8\}" | tail -1 | grep -o "[0-9]\{8\}")
fi
ISO="void-live-${QEMU_ARCH}-${MUSL}${DATE}-${VARIANT}.iso"
HASH="$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)"
echo "${URL}/${ISO} ${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:-}"
}