DistroHopper/templates/opensuse
2026-11-17 18:32:48 +01:00

47 lines
1.6 KiB
Text

# Template file for 'opensuse'
OSNAME="opensuse"
PRETTY="openSUSE"
LOGO=" "
ICON="opensuse.svg"
CATEGORY="Beginner"
BASEDOF="-"
HOMEPAGE="https://www.opensuse.org"
DESCRIPTION="The makers choice for sysadmins, developers and desktop users"
CREDENTIALS="-"
GPG=""
RSS=""
DW=""
function releases_() {
# shellcheck disable=SC2046,SC2005
# Leap have 16.0 dir but no iso file nor iso dir there
if web_pipe "https://download.opensuse.org/distribution/leap/16.0/" | grep -q 'href="iso/"'; then
echo $(web_pipe "https://download.opensuse.org/distribution/leap/" | grep 'class="name"' | cut -d '/' -f2 | grep -v 42 | sort -r | tail --lines +2) microos tumbleweed
else
echo tumbleweed microos 15.6 15.5 15.4 15.3 15.2 15.1 15.0
fi
}
function get_() {
local HASH=""
local ISO=""
local URL=""
if [ "${RELEASE}" == "tumbleweed" ]; then
ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso"
URL="https://download.opensuse.org/tumbleweed/iso"
elif [ "${RELEASE}" == "microos" ]; then
ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso"
URL="https://download.opensuse.org/tumbleweed/iso"
elif [ "${RELEASE}" == "aeon" ]; then
ISO="opensuse-aeon.x86_64.iso"
URL="https://mirrorcache.opensuse.org/tumbleweed/appliances/iso"
elif [ "${RELEASE}" == 15.0 ] || [ "${RELEASE}" == 15.1 ]; then
ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso"
URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso"
else
ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64-Current.iso"
URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso"
fi
HASH=$(web_pipe "${URL}/${ISO}.sha256" | grep -oE '^[[:xdigit:]]{64}' | head -n 1)
echo "${URL}/${ISO} ${HASH}"
}