mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Refactor openSUSE support
This commit is contained in:
parent
9b1dba263b
commit
20b7478f31
1 changed files with 18 additions and 22 deletions
40
quickget
40
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}"
|
||||
|
|
Loading…
Reference in a new issue