diff --git a/quickget b/quickget index 06933d2..fb9adbd 100755 --- a/quickget +++ b/quickget @@ -87,10 +87,10 @@ function releases_linuxmint(){ } function releases_opensuse(){ - echo 15_0 \ - 15_1 \ - 15_2 \ - 15_3 \ + echo 15.0 \ + 15.1 \ + 15.2 \ + 15.3 \ microos \ tumbleweed } @@ -575,30 +575,26 @@ function get_linuxmint() { } function get_opensuse() { - # For future releases, use dvd1 iso files. + local ISO="" + local RELEASES="" local URL="" - local DL_BASE="https://download.opensuse.org/" - local VERSION="" - case ${RELEASE} in - 15_0|15_1|15_2|15_3|tumbleweed|microos) VERSION=${RELEASE//_/.};; - *) - echo "ERROR! openSUSE ${RELEASE} is not a supported release." - releases_opensuse - exit 1 - ;; - esac + RELEASES=$(releases_opensuse) + if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then + echo "ERROR! openSUSE ${RELEASE} is not a supported release." + echo "${RELEASES}" + exit 1 + fi - if [ "${VERSION}" == "tumbleweed" ]; then + if [ "${RELEASE}" == "tumbleweed" ]; then ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso" - URL="${DL_BASE}/tumbleweed/iso/${ISO}" - elif - [ "${VERSION}" == "microos" ]; then + URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" + elif [ "${RELEASE}" == "microos" ]; then ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso" - URL="${DL_BASE}/tumbleweed/iso/${ISO}" + URL="https://download.opensuse.org/tumbleweed/iso/${ISO}" else - ISO="openSUSE-Leap-${VERSION}-DVD-x86_64.iso" - URL="${DL_BASE}/distribution/leap/${VERSION}/iso/${ISO}" + ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso" + URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}" fi make_vm_dir web_get "${URL}" "${VM_PATH}"