# Template file for 'opensuse' OSNAME="opensuse" PRETTY="openSUSE" BASEDOF="-" DESCRIPTION="The makers choice for sysadmins, developers and desktop users" HOMEPAGE="https://www.opensuse.org" CREDENTIALS="-" RELEASES="tumbleweed microos aeon 15.6 15.5 15.4 15.3 15.2 15.1 15.0" 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) aeon microos tumbleweed else echo tumbleweed microos aeon 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" | awk '{if(NR==4) print $0}' | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" }