DistroHopper/actions/sparkylinux
2025-09-07 13:26:36 +00:00

37 lines
1.4 KiB
Text

# Template file for 'sparkylinux'
OSNAME="sparkylinux"
PRETTY="SparkyLinux"
ICON=""
BASEDOF="Debian"
HOMEPAGE="https://sparkylinux.org"
DESCRIPTION="Fast, lightweight and fully customizable operating system which offers several versions for different use cases"
CREDENTIALS="-"
function releases_() {
#shellcheck disable=SC2046,SC2005
echo $(web_pipe "https://sparkylinux.org/download/stable/" | grep "iso/download" | cut -d'-' -f3 | sort -ru)
}
function editions_() {
echo minimalcli minimalgui mate lxqt kde xfce
#shellcheck disable=SC2046,SC2005
# if [ -z "${RELEASE}" ]; then
# echo $(web_pipe "https://sparkylinux.org/download/stable/" | grep "iso/download" | cut -d'-' -f5 | cut -d'.' -f1 | sort -u)
# else
# echo $(web_pipe "https://sparkylinux.org/download/stable/" | grep "sparkylinux-${RELEASE}-" | cut -d'-' -f5 | cut -d'.' -f1 | sort -u)
# fi
}
function get_() {
local HASH=""
local ISO=""
local URL=""
ISO="sparkylinux-${RELEASE}-x86_64-${EDITION}.iso"
case ${EDITION} in
minimalcli) URL="https://sourceforge.net/projects/sparkylinux/files/cli";;
minimalgui) URL="https://sourceforge.net/projects/sparkylinux/files/base";;
*) URL="https://sourceforge.net/projects/sparkylinux/files/${EDITION}";;
esac
HASH=$(web_pipe "${URL}/${ISO}.allsums.txt" | head -n 2 | grep 'iso' | cut -d' ' -f1)
echo "${URL}/${ISO}" "${HASH}"
}