# Template file for 'neko-void' OSNAME="neko-void" PRETTY="Neko-Void" LOGO="" ICON="neko-void.svg" ICON_ONLINE="" CATEGORY="Desktop, Live Medium" BASEDOF="Void" DESCRIPTION="Designed for users who want Void Linux's stability and minimalism with modern desktop functionality" HOMEPAGE="https://www.neko-void-linux.online" CREDENTIALS="" GPG="" RSS="https://sourceforge.net/projects/neko-void/rss?path=/" DW="" MAGNET="" MAGNET_PREFERRED="" TORRENT="" CHAT="" RELEASES="latest" EDITIONS="i3 kde labwc lts-icewm lts-jwm lxqt mate matelibre niri" EDITIONS_LIST="i3 kde labwc lts-icewm lts-jwm lxqt mate matelibre niri" QEMU_ARCH="amd64" releases_() { echo latest } _neko_images_() { web_pipe "${HOMEPAGE}/" | awk ' function emit() { if (url != "") printf "%s\t%s\t%s\n", edition, url, checksum url = edition = checksum = "" } /href=["\047]https:\/\// && /nekovoid-[[:alnum:]-]+-[0-9]+\.iso/ { emit() url = $0 sub(/^.*href=["\047]/, "", url) sub(/["\047].*$/, "", url) gsub(/&/, "\\&", url) edition = url sub(/^.*\/nekovoid-/, "", edition) sub(/-[0-9]+\.iso.*$/, "", edition) } /SHA256:/ && url != "" { checksum = $0 sub(/^.*SHA256:[[:space:]]*/, "", checksum) sub(/[^[:xdigit:]].*$/, "", checksum) if (length(checksum) != 64) checksum = "" emit() } END { emit() } ' } editions_() { _neko_images_ | cut -f1 | sort -u } get_() { [ "${RELEASE:-latest}" = latest ] || return 1 local ENTRY ENTRY=$(_neko_images_ | awk -F '\t' -v edition="${EDITION}" ' $1 == edition { url = $2; checksum = $3 } END { if (url != "") { printf "%s", url if (checksum != "") printf " %s", checksum printf "\n" } } ') [ -n "${ENTRY}" ] || return 1 printf '%s\n' "${ENTRY}" } 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:-}" }