mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2026-12-06 04:43:46 +00:00
115 lines
3 KiB
Text
115 lines
3 KiB
Text
# Template file for 'artix-linux'
|
|
OSNAME="artix-linux"
|
|
PRETTY="Artix Linux"
|
|
LOGO=" "
|
|
ICON="artix-linux.svg"
|
|
ICON_ONLINE=""
|
|
CATEGORY="Desktop, Server"
|
|
BASEDOF="Arch"
|
|
DESCRIPTION="The Art of Linux Simple Fast Systemd-free"
|
|
HOMEPAGE="https://artixlinux.org"
|
|
CREDENTIALS="-"
|
|
GPG=""
|
|
RSS=""
|
|
DW=""
|
|
MAGNET=""
|
|
MAGNET_PREFERRED=""
|
|
TORRENT=""
|
|
CHAT=""
|
|
|
|
RELEASES="20261104 20261102"
|
|
EDITIONS="base-dinit base-openrc base-runit base-s6 cinnamon-dinit cinnamon-openrc community-gtk-openrc community-qt-openrc lxde-dinit lxde-openrc lxqt-dinit lxqt-openrc mate-dinit mate-openrc plasma-dinit plasma-openrc xfce-dinit xfce-openrc"
|
|
EDITIONS_LIST="base-dinit
|
|
base-openrc
|
|
base-runit
|
|
base-s6
|
|
cinnamon-dinit
|
|
cinnamon-openrc
|
|
community-gtk-openrc
|
|
community-qt-openrc
|
|
lxde-dinit
|
|
lxde-openrc
|
|
lxqt-dinit
|
|
lxqt-openrc
|
|
mate-dinit
|
|
mate-openrc
|
|
plasma-dinit
|
|
plasma-openrc
|
|
xfce-dinit
|
|
xfce-openrc"
|
|
QEMU_ARCH="amd64"
|
|
|
|
releases_() {
|
|
# The mirror lists the images as artix-<edition>-<date>-x86_64.iso; the
|
|
# release is the date part. The editions are built on different days,
|
|
# so all of the dates are offered.
|
|
echo $(web_pipe "https://mirror1.artixlinux.org/iso/" \
|
|
| grep -oE 'artix-[a-z0-9-]+-[0-9]{8}-x86_64\.iso' \
|
|
| sed -E 's/^artix-[a-z0-9-]+-([0-9]{8})-x86_64\.iso$/\1/' \
|
|
| sort -ru \
|
|
| uniq)
|
|
}
|
|
|
|
editions_() {
|
|
# Extract edition-init combinations (e.g., base-dinit, plasma-openrc, community-gtk-openrc)
|
|
echo $(web_pipe "https://mirror1.artixlinux.org/iso/" \
|
|
| grep -oE 'artix-[a-z0-9-]+-[0-9]{8}-x86_64\.iso' \
|
|
| sed -E 's/^artix-(.*)-[0-9]{8}-x86_64\.iso$/\1/' \
|
|
| sort -u)
|
|
}
|
|
|
|
arch_() {
|
|
echo amd64
|
|
}
|
|
|
|
get_() {
|
|
local HASH=""
|
|
local ISO=""
|
|
local URL="https://iso.artixlinux.org/iso"
|
|
# The editions are built on different days, so the image of an edition is
|
|
# not always the one of the newest release. The checksum file lists the
|
|
# exact images, so the one matching the edition and the release is used.
|
|
ISO=$(web_pipe "${URL}/sha256sums" \
|
|
| grep -E "artix-${EDITION}-${RELEASE}-x86_64\.iso\$" \
|
|
| awk '{print $2}' \
|
|
| head -n 1)
|
|
if [ -z "${ISO}" ]; then
|
|
# Fall back to the newest image of this edition.
|
|
ISO=$(web_pipe "https://mirror1.artixlinux.org/iso/" \
|
|
| grep -oE "artix-${EDITION}-[0-9]{8}-x86_64\.iso" \
|
|
| sort -ru \
|
|
| head -n 1)
|
|
fi
|
|
if [ -z "${ISO}" ]; then
|
|
echo "ERROR! No Artix image found for ${EDITION} ${RELEASE}." >&2
|
|
return 1
|
|
fi
|
|
HASH=$(web_pipe "${URL}/sha256sums" | grep -E " ${ISO}\$" | awk '{print $1}' | head -n 1)
|
|
echo "${URL}/${ISO} ${HASH}"
|
|
}
|
|
|
|
config_() {
|
|
echo "disk_size=\"32G\"" >> "${CONF_FILE}"
|
|
}
|
|
|
|
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:-}"
|
|
}
|