DistroHopper/public/t4n-os
2026-11-29 05:46:38 +01:00

72 lines
1.9 KiB
Text

# Template file for 't4n-os'
OSNAME="t4n-os"
PRETTY="T4n OS"
LOGO=""
ICON="t4n-os.svg"
ICON_ONLINE=""
CATEGORY="Desktop, Live Medium, Lightwight"
BASEDOF="Void"
DESCRIPTION="Lightweight, fast and minimalist Linux distribution based on Void Linux with vanilla Xfce desktop"
HOMEPAGE="https://t4n-labs.github.io/t4n-os"
CREDENTIALS="anon:voidlinux,root:voidlinux"
GPG="https://sourceforge.net/projects/t4n-os/files/t4n-public.key"
RSS="https://sourceforge.net/projects/t4n-os/rss?path=/"
DW=""
MAGNET=""
MAGNET_PREFERRED=""
TORRENT=""
CHAT=""
RELEASES="latest"
EDITIONS="base xfce"
EDITIONS_LIST="base
xfce"
QEMU_ARCH="amd64"
releases_() {
echo latest
}
editions_() {
web_pipe "${RSS}" \
| grep -oE 'T4n-OS_[^/<"]+/t4n_os-live-x86_64-[0-9]{8}-[a-z0-9-]+\.iso' \
| sed -E 's#^.*/t4n_os-live-x86_64-[0-9]{8}-([a-z0-9-]+)\.iso$#\1#' \
| sort -u
}
get_() {
local FILE_PATH=""
FILE_PATH=$(web_pipe "${RSS}" \
| grep -oE "T4n-OS_[^/<\"]+/t4n_os-live-x86_64-[0-9]{8}-${EDITION}\\.iso" \
| head -n 1)
[ -n "${FILE_PATH}" ] || return 1
local DIR_PATH="${FILE_PATH%%/*}"
local URL="https://sourceforge.net/projects/t4n-os/files/${DIR_PATH}"
local ISO="${FILE_PATH##*/}"
local HASH=""
HASH=$(web_pipe "${URL}/t4nos-${EDITION}-sha256sums/download" \
| awk -v iso="${ISO}" '$2 == iso && length($1) == 64 {print $1; exit}')
echo "${URL}/${ISO}/download ${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:-}"
}