Refactor openSUSE support

pull/139/head
Martin Wimpress 3 years ago committed by Martin Wimpress
parent 9b1dba263b
commit 20b7478f31
  1. 36
      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//_/.};;
*)
RELEASES=$(releases_opensuse)
if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then
echo "ERROR! openSUSE ${RELEASE} is not a supported release."
releases_opensuse
echo "${RELEASES}"
exit 1
;;
esac
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}"

Loading…
Cancel
Save