mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
parent
ada72ca5b2
commit
257a63ca66
1 changed files with 48 additions and 0 deletions
48
quickget
48
quickget
|
@ -48,6 +48,7 @@ function pretty_name() {
|
|||
openbsd) PRETTY_NAME="OpenBSD";;
|
||||
opensuse) PRETTY_NAME="openSUSE";;
|
||||
popos) PRETTY_NAME="Pop!_OS";;
|
||||
rockylinux) PRETTY_NAME="Rocky Linux";;
|
||||
ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";;
|
||||
ubuntu-kylin) PRETTY_NAME="Ubuntu Kylin";;
|
||||
ubuntu-mate) PRETTY_NAME="Ubuntu MATE";;
|
||||
|
@ -143,6 +144,7 @@ function os_support() {
|
|||
openbsd \
|
||||
opensuse \
|
||||
popos \
|
||||
rockylinux \
|
||||
ubuntu \
|
||||
ubuntu-budgie \
|
||||
ubuntu-kylin \
|
||||
|
@ -221,6 +223,14 @@ function releases_popos() {
|
|||
21.04
|
||||
}
|
||||
|
||||
function releases_rockylinux() {
|
||||
echo 8.4 \
|
||||
8.3 \
|
||||
8.2 \
|
||||
8.1 \
|
||||
8.0
|
||||
}
|
||||
|
||||
function releases_ubuntu() {
|
||||
echo bionic \
|
||||
focal \
|
||||
|
@ -593,6 +603,9 @@ function make_vm_config() {
|
|||
elif [ "${OS}" == "popos" ]; then
|
||||
GUEST="linux"
|
||||
IMAGE_TYPE="iso"
|
||||
elif [ "${OS}" == "rockylinux" ]; then
|
||||
GUEST="linux"
|
||||
IMAGE_TYPE="iso"
|
||||
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
||||
GUEST="linux"
|
||||
IMAGE_TYPE="iso"
|
||||
|
@ -803,6 +816,25 @@ function get_openbsd() {
|
|||
make_vm_config "${ISO}"
|
||||
}
|
||||
|
||||
function get_rocky() {
|
||||
local HASH=""
|
||||
local ISO=""
|
||||
local URL=""
|
||||
|
||||
local arch="x86_64"
|
||||
local baseurl="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/${arch}"
|
||||
|
||||
validate_release "releases_rockylinux"
|
||||
ISO="Rocky-${RELEASE}-${arch}-${ISOTYPE}.iso"
|
||||
URL="${baseurl}/${ISO}"
|
||||
HASH=$(wget -q -O- "${baseurl}/CHECKSUM" | grep "SHA256 (${ISO})" | grep -E -i -w -o '[0-9a-z]{64}')
|
||||
|
||||
web_get "${URL}" "${VM_PATH}"
|
||||
check_hash "${ISO}" "${HASH}"
|
||||
make_vm_config "${ISO}"
|
||||
}
|
||||
|
||||
|
||||
function get_opensuse() {
|
||||
local HASH=""
|
||||
local ISO=""
|
||||
|
@ -1101,6 +1133,22 @@ if [ -n "${2}" ]; then
|
|||
fi
|
||||
VM_PATH="${OS}-${RELEASE}-${DRIVER}"
|
||||
get_popos "${DRIVER}"
|
||||
elif [ "${OS}" == "rockylinux" ]; then
|
||||
if [ -n "${3}" ]; then
|
||||
ISOTYPE="${3}"
|
||||
ISOTYPES=(minimal dvd1 boot)
|
||||
if [[ ! ${ISOTYPES[*]} =~ ${ISOTYPE} ]]; then
|
||||
echo "iso ${ISOTYPE} is not supported:"
|
||||
for ISOTYPE in "${ISOTYPES[@]}"; do
|
||||
echo "${ISOTYPE}"
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
ISOTYPE="dvd1"
|
||||
fi
|
||||
VM_PATH="${OS}-${RELEASE}-${ISOTYPE}"
|
||||
get_rocky "${ISOTYPE}"
|
||||
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
||||
get_ubuntu
|
||||
elif [ "${OS}" == "windows" ]; then
|
||||
|
|
Loading…
Reference in a new issue