diff --git a/README.md b/README.md
index 896b282..e09466a 100644
--- a/README.md
+++ b/README.md
@@ -32,41 +32,21 @@ Features
--------
- **macOS** Monterey, Big Sur, Catalina, Mojave & High Sierra
-
- **Windows** 8.1, 10 and 11 including TPM 2.0
-
-- [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu
- flavours](https://ubuntu.com/download/flavours)**
-- [Fedora](https://getfedora.org/) & openSUSE
- ([Leap](https://get.opensuse.org/leap/),
- [Tumbleweed](https://get.opensuse.org/tumbleweed/),
- [MicroOS](https://microos.opensuse.org/))
-- [Linux Mint](https://linuxmint.com/) (Cinnamon, MATE, and XFCE),
- [elementary OS](https://elementary.io/),
- [Pop!\_OS](https://pop.system76.com/)
-- [Arch Linux](https://www.archlinux.org/),
- [Kali](https://www.kali.org/),[Garuda](https://garudalinux.org/),
- [ZorinOS](https://zorin.com/os/) & [NixOS](https://nixos.org/)
-- [Regolith Linux](https://regolith-linux.org/) (Release 1.6 and
- latest 2.0.0 pre-release )
-
-- [FreeBSD](https://www.freebsd.org/) &
- [OpenBSD](https://www.openbsd.org/)
-
+- [Ubuntu](https://ubuntu.com/desktop) and all the **[official Ubuntu flavours](https://ubuntu.com/download/flavours)**
+- **Over 360 operating system editions are supported!**
- Full SPICE support including host/guest clipboard sharing
- VirtIO-webdavd file sharing for Linux and Windows guests
- VirtIO-9p file sharing for Linux and macOS guests
-- [QEMU Guest Agent
- support](https://wiki.qemu.org/Features/GuestAgent); provides access
- to a system-level agent via standard QMP commands
-- Samba file sharing for Linux, macOS and Windows guests (*if `smbd`
- is installed on the host*)
+- [QEMU Guest Agent support](https://wiki.qemu.org/Features/GuestAgent); provides access to a system-level agent via standard QMP commands
+- Samba file sharing for Linux, macOS and Windows guests (*if `smbd` is installed on the host*)
- VirGL acceleration
- USB device pass-through
- Smartcard pass-through
- Automatic SSH port forwarding to guests
- Network port forwarding
- Full duplex audio
+- Braille support
- EFI (with or without SecureBoot) and Legacy BIOS boot
- Graphical user interfaces available
@@ -86,8 +66,7 @@ QEMU](https://img.youtube.com/vi/AOTYWEgw0hI/0.jpg)](https://www.youtube.com/wat
Requirements
------------
-- [QEMU](https://www.qemu.org/) (*6.0.0 or newer*) **with GTK, SDL,
- SPICE & VirtFS support**
+- [QEMU](https://www.qemu.org/) (*6.0.0 or newer*) **with GTK, SDL, SPICE & VirtFS support**
- [bash](https://www.gnu.org/software/bash/) (*4.0 or newer*)
- [Coreutils](https://www.gnu.org/software/coreutils/)
- [EDK II](https://github.com/tianocore/edk2)
@@ -223,57 +202,47 @@ with your preferred flavour.
- `ubuntu` (Ubuntu)
- `xubuntu` (Xubuntu)
-Other Linux Guests
-------------------
+Other Operating Systems
+-----------------------
`quickget` also supports:
- `alma` (Alma Linux)
- `alpine` (Alpine Linux)
+- `android` (Android x86)
- `archlinux` (Arch Linux)
- `arcolinux` (Arco Linux)
- `cachyos` (CachyOS)
- `debian` (Debian)
+- `devuan` (Devuan)
- `elementary` (elementary OS)
- `fedora` (Fedora)
+- `freebsd` (FreeBSD)
- `garuda` (Garuda Linux)
- `gentoo` (Gentoo)
+- `ghostbsd` (GhostBSD)
- `haiku` (Haiku)
- `kali` (Kali)
- `kdeneon` (KDE Neon)
- `kolibrios` (KolibriOS)
-- `linuxmint-cinnamon` (Linux Mint Cinnamon)
-- `linuxmint-mate` (Linux Mint MATE)
-- `linuxmint-xfce` (Linux Mint XFCE)
-- `manjaro-budgie` (Manjaro Budgie)
-- `manjaro-cinnamon` (Manjaro Cinnamon)
-- `manjaro-deepin` (Manjaro Deepin)
-- `manjaro-gnome` (Manjaro Gnome)
-- `manjaro-i3` (Manjaro i3)
-- `manjaro-kde` (Manjaro KDE)
-- `manjaro-mate` (Manjaro MATE)
-- `manjaro-xfce` (Manjaro XFCE)
-- `mxlinux-fluxbox` (MX Linux Fluxbox)
-- `mxlinux-kde` (MX Linux KDE)
-- `mxlinux-xfce` (MX Linux XFCE)
-- `nixos-gnome` (NixOS Gnome)
-- `nixos-minimal` (NixOS Minimal)
-- `nixos-plasma5` (NixOS KDE)
+- `linuxmint` (Linux Mint)
+- `manjaro` (Manjaro)
+- `mxlinux` (MX Linux)
+- `netboot` (netboot.xyz)
+- `netbsd` (NetBSD)
+- `nixos` (NixOS)
+- `openbsd` (OpenBSD)
- `opensuse` (openSUSE)
- `oraclelinux` (Oracle Linux)
- `popos` (Pop!\_OS)
- `regolith` (Regolith Linux)
- `rockylinux` (Rocky Linux)
+- `slackware` (Slackware)
- `solus` (Solus)
- `tails` (Tails)
- `void` (Void Linux)
- `zorin` (Zorin OS)
-### BSD Guest Support
-
-- `freebsd` (FreeBSD)
-- `openbsd` (OpenBSD)
-
Or you can download a Linux image and manually create a VM
configuration.
@@ -430,45 +399,6 @@ tpm="on"
- `tpm="on"` instructs `quickemu` to create a software emulated TPM
device using `swtpm`.
-BSD Guests
-----------
-
-`quickemu` supports FreeBSD and OpenBSD.
-
-``` {.bash}
-quickget freebsd 13_0
-quickemu --vm freebsd-13_0.conf
-```
-
-Other Guests
-------------
-
-- `android` (Android x86)
-
-Haiku Guests
-------------
-
-`quickemu` supports [Haiku](https://www.haiku-os.org/).
-
-``` {.bash}
-quickget quickget haiku r1beta3-x86_64
-quickemu --vm haiku-r1beta3-x86_64.conf
-```
-
-At the moment the only way to share files between host and a Haiku guest
-is by using SSH (having a SSH server running on the host):
-
-On guest:
-
-``` {.bash}
-scp example.txt user@host-local-ip:/home/user # sending a file from guest to host
-scp user@host-local-ip:/home/user/example.txt . # receiving a file from host to guest
-```
-
-`quickget` cannot automatically download and create virtual machines for
-Haiku nightly versions, but they work if the ISO and configuration are
-set up manually.
-
SPICE
=====
@@ -688,7 +618,7 @@ Usage
quickemu --vm ubuntu.conf
You can also pass optional parameters
- --accessible : Select accessible facilitation. 'braille' (default - currently requires --display sdl )
+ --braille : Enable braille support. Requires SDL.
--delete-disk : Delete the disk image and EFI variables
--delete-vm : Delete the entire VM and it's configuration
--display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice'
diff --git a/quickemu b/quickemu
index b83729b..5530eee 100755
--- a/quickemu
+++ b/quickemu
@@ -464,14 +464,19 @@ function vm_boot() {
# Make any OS specific adjustments
case ${guest_os} in
- freebsd|linux|openbsd)
+ *bsd|haiku|linux)
CPU="-cpu host,kvm=on"
if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
CPU="${CPU},topoext"
fi
- if [ "${guest_os}" == "freebsd" ]; then
+
+ if [ "${guest_os}" == "freebsd" ] || [ "${guest_os}" == "ghostbsd" ]; then
MOUSE="usb-mouse"
+ elif [ "${guest_os}" == "haiku" ]; then
+ MACHINE_TYPE="pc"
+ NET_DEVICE="rtl8139"
fi
+
if [ -z "${disk_size}" ]; then
disk_size="16G"
fi
@@ -483,22 +488,10 @@ function vm_boot() {
fi
MACHINE_TYPE="pc"
NET_DEVICE="rtl8139"
- GUEST_TWEAKS="-boot d"
if [ -z "${disk_size}" ]; then
disk_size="256M"
fi
;;
- haiku)
- CPU="-cpu host,kvm=on"
- MACHINE_TYPE="pc"
- NET_DEVICE="rtl8139"
- if [ "${HOST_CPU_VENDOR}" == "AuthenticAMD" ]; then
- CPU="${CPU},topoext"
- fi
- if [ -z "${disk_size}" ]; then
- disk_size="32G"
- fi
- ;;
macos)
#https://www.nicksherlock.com/2020/06/installing-macos-big-sur-on-proxmox/
# A CPU with SSE4.1 support is required for >= macOS Sierra
@@ -657,7 +650,7 @@ function vm_boot() {
# Setup the appropriate audio device based on the display output
case ${OUTPUT} in
- spice|spice-app|none) AUDIO_DEV="spice,id=audio0,out.mixing-engine=off";;
+ spice|spice-app|none) AUDIO_DEV="spice,id=audio0";;
*) AUDIO_DEV="pa,id=audio0,out.mixing-engine=off,out.stream-name=${LAUNCHER}-${VMNAME},in.stream-name=${LAUNCHER}-${VMNAME}";;
esac
@@ -904,8 +897,9 @@ function vm_boot() {
-monitor none
-serial mon:stdio)
- if [[ "${ACCESSIBLE}" == "braille" ]] || [[ "${ACCESSIBLE}" == "brl" ]]; then
- # shellcheck disable=SC2054
+ # FIXME: Check for device availability. qemu will fail to start otherwise
+ if [ -n "${BRAILLE}" ]; then
+ # shellcheck disable=SC2054
args+=(-chardev braille,id=brltty
-device usb-braille,id=usbbrl,chardev=brltty)
fi
@@ -1056,7 +1050,7 @@ function usage() {
echo " ${LAUNCHER} --vm ubuntu.conf"
echo
echo "You can also pass optional parameters"
- echo " --accessible : Select accessible facilitation. 'braille' (default - currently requires --display sdl )"
+ echo " --braille : Enable braille support. Requires SDL."
echo " --delete-disk : Delete the disk image and EFI variables"
echo " --delete-vm : Delete the entire VM and it's configuration"
echo " --display : Select display backend. 'sdl' (default), 'gtk', 'none', or 'spice'"
@@ -1073,14 +1067,6 @@ function usage() {
exit 1
}
-#
-function accessible_param_check() {
- if [ "${ACCESSIBLE}" != "braille" ] && [ "${ACCESSIBLE}" != "brl" ] ; then
- echo "ERROR! Requested accessiblility '${ACCESSIBLE}' is not recognised."
- exit 1
- # TODO can we check the device/API is available
- fi
-}
function display_param_check() {
if [ "${OUTPUT}" != "gtk" ] && [ "${OUTPUT}" != "none" ] && [ "${OUTPUT}" != "sdl" ] && [ "${OUTPUT}" != "spice" ]; then
echo "ERROR! Requested output '${OUTPUT}' is not recognised."
@@ -1111,6 +1097,7 @@ tpm="off"
usb_devices=()
extra_args=""
+BRAILLE=""
DELETE_DISK=0
DELETE_VM=0
FULLSCREEN=""
@@ -1132,7 +1119,7 @@ VMPATH=""
readonly LAUNCHER=$(basename "${0}")
readonly DISK_MIN_SIZE=$((197632 * 8))
-readonly VERSION="3.11"
+readonly VERSION="3.12"
# PUBLICSHARE is the only directory exposed to guest VMs for file
# sharing via 9P, spice-webdavd and Samba. This path is not configurable.
@@ -1172,10 +1159,8 @@ if [ $# -lt 1 ]; then
else
while [ $# -gt 0 ]; do
case "${1}" in
- -acc|--acc|-accessible|--accessible|-accessibility|--accessibility)
- ACCESSIBLE="${2}"
- accessible_param_check
- shift
+ -braille|--braille)
+ BRAILLE="on"
shift;;
-delete|--delete|-delete-disk|--delete-disk)
DELETE_DISK=1
@@ -1258,7 +1243,10 @@ if [ -n "${VM}" ] && [ -e "${VM}" ]; then
fi
if [ -z "${OUTPUT}" ]; then
- if [ -z "${display}" ]; then
+ # Braille support requires SDL. Override OUTPUT if braille was requested.
+ if [ -n "${BRAILLE}" ]; then
+ OUTPUT="sdl"
+ elif [ -z "${display}" ]; then
OUTPUT="sdl"
else
OUTPUT="${display}"
diff --git a/quickget b/quickget
index bae921a..540eef5 100755
--- a/quickget
+++ b/quickget
@@ -1,28 +1,31 @@
#!/usr/bin/env bash
-
# Here the quick 'n dirty guide to adding a new OS to quickget
#
-# 1. Add the new OS, all lowercase, to os_support()
-# 2. Add a "pretty name" display name to pretty_name()
-# 3. Create a releases_newos() generator that outputs the currently supported release versions
-# 4. Add the new OS to make_vm_config()
-# 5. Create a get_newos() function that does something like this:
+# 1. Update os_support() - add new OS, all lowercase
+# 2. Update pretty_name() - add a pretty name for new OS *only if the catch all is not suitable*
+# 3. Create a releases_newos() generator (required) outputs the current supported release versions
+# 4. Create a editions_newos() generator (optional) outputs the editions if new OS has multiple flavours/editions
+# 5. Update make_vm_config() - add any *required* new OS tweaks
+# 6. Create a get_newos() function - that does something like this:
# function get_newos() {
+# local EDITION=""
# local HASH=""
# local ISO=""
# local URL=""
#
-# validate_release "releases_newos"
-# ISO="newos-${RELEASE}-amd64.iso"
-# URL="https://www.newos.org/download/${ISO}"
-# web_get "${URL}" "${VM_PATH}"
+# if [ -n "${1}" ]; then
+# EDITION="${1}"
+# fi
+#
+# URL="https://www.newos.org/download/${RELEASE}/${EDITION}"
+# ISO="newos-${RELEASE}-${EDITION}-amd64.iso"
+# web_get "${URL}/${ISO}" "${VM_PATH}"
# web_get "${URL}/SHA256SUMS" "${VM_PATH}"
-# HASH=$(cat "${VM_PATH}/SHA256SUMS" | cut -d' ' -f1)
+# HASH=$(cut -d' ' -f1 < "${VM_PATH}/SHA256SUMS")
# check_hash "${ISO}" "${HASH}"
# make_vm_config "${ISO}"
# }
-# 6. Add new OS to the argument parser at the bottom of the script
function cleanup() {
if [ -n "$(jobs -p)" ]; then
@@ -43,28 +46,15 @@ function pretty_name() {
cachyos) PRETTY_NAME="CachyOS";;
elementary) PRETTY_NAME="elementary OS";;
freebsd) PRETTY_NAME="FreeBSD";;
- gentoo) PRETTY_NAME="Gentoo";;
garuda) PRETTY_NAME="Garuda Linux";;
- haiku) PRETTY_NAME="Haiku";;
+ ghostbsd) PRETTY_NAME="GhostBSD";;
kdeneon) PRETTY_NAME="KDE Neon";;
kolibrios) PRETTY_NAME="KolibriOS";;
- linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";;
- linuxmint-mate) PRETTY_NAME="Linux Mint MATE";;
- linuxmint-xfce) PRETTY_NAME="Linux Mint XFCE";;
- manjaro-xfce) PRETTY_NAME="Manjaro XFCE";;
- manjaro-kde) PRETTY_NAME="Manjaro KDE";;
- manjaro-gnome) PRETTY_NAME="Manjaro Gnome";;
- manjaro-budgie) PRETTY_NAME="Manjaro Budgie";;
- manjaro-cinnamon) PRETTY_NAME="Manjaro Cinnamon";;
- manjaro-deepin) PRETTY_NAME="Manjaro Deepin";;
- manjaro-i3) PRETTY_NAME="Manjaro i3";;
- manjaro-mate) PRETTY_NAME="Manjaro MATE";;
- mxlinux-xfce) PRETTY_NAME="MX Linux XFCE";;
- mxlinux-kde) PRETTY_NAME="MX Linux KDE";;
- mxlinux-fluxbox) PRETTY_NAME="MX Linux Fluxbox";;
- nixos-gnome) PRETTY_NAME="NixOS Gnome";;
- nixos-plasma5) PRETTY_NAME="NixOS KDE";;
- nixos-minimal) PRETTY_NAME="NixOS Minimal";;
+ linuxmint) PRETTY_NAME="Linux Mint";;
+ mxlinux) PRETTY_NAME="MX Linux";;
+ netboot) PRETTY_NAME="netboot.xyz";;
+ netbsd) PRETTY_NAME="NetBSD";;
+ nixos) PRETTY_NAME="NixOS";;
macos) PRETTY_NAME="macOS";;
openbsd) PRETTY_NAME="OpenBSD";;
opensuse) PRETTY_NAME="openSUSE";;
@@ -86,14 +76,19 @@ function pretty_name() {
function validate_release() {
local DISPLAY_NAME=""
- local RELEASE_GENERATOR="${1}"
+ local RELEASE_GENERATOR=""
local RELEASES=""
DISPLAY_NAME="$(pretty_name "${OS}")"
+ case ${OS} in
+ *ubuntu*) RELEASE_GENERATOR="releases_ubuntu";;
+ *) RELEASE_GENERATOR="${1}";;
+ esac
+
RELEASES=$(${RELEASE_GENERATOR})
if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then
- echo "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
- echo "${RELEASES}"
+ echo -e "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release.\n"
+ echo -n "${RELEASES}"
exit 1
fi
}
@@ -106,6 +101,7 @@ function list_json() {
function list_csv() {
local DISPLAY_NAME
+ local DL=""
local DOWNLOADER
local FUNC
local OPTION
@@ -113,71 +109,50 @@ function list_csv() {
local PNG
local RELEASE
local SVG
- local ZS=""
- local DL=""
+ local HAS_ZSYNC=0
-# check if we have a zsync installed somewhere
- ZS="$(which zsync)"
- if [ -x "${ZS}" ]; then
- DL="zsync"
- else
+ # Check if zsync is available
+ if command -v zsync &>/dev/null; then
+ HAS_ZSYNC=1
+ fi
+
+ if command -v aria2c &>/dev/null; then
+ DL="aria2c"
+ elif command -v wget &>/dev/null; then
DL="wget"
fi
+
echo "Display Name,OS,Release,Option,Downloader,PNG,SVG"
for OS in $(os_support); do
DISPLAY_NAME="$(pretty_name "${OS}")"
if [[ "${OS}" == *"ubuntu"* ]]; then
FUNC="ubuntu"
- elif [[ "${OS}" == *"linuxmint"* ]]; then
- FUNC="linuxmint"
- elif [[ "${OS}" == *"manjaro"* ]]; then
- FUNC="manjaro"
- elif [[ "${OS}" == *"mxlinux"* ]]; then
- FUNC="mxlinux"
- elif [[ "${OS}" == *"nixos"* ]]; then
- FUNC="nixos"
else
FUNC="${OS}"
fi
PNG="https://quickemu-project.github.io/quickemu-icons/png/${FUNC}/${FUNC}-quickemu-white-pinkbg.png"
SVG="https://quickemu-project.github.io/quickemu-icons/svg/${FUNC}/${FUNC}-quickemu-white-pinkbg.svg"
-
for RELEASE in $("releases_${FUNC}"); do
if [ "${OS}" == "macos" ]; then
DOWNLOADER="macrecovery"
- elif [ "${OS}" == "ubuntu" ] && [ "${RELEASE}" == "canary" ]; then
- DOWNLOADER="${DL}"
- elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ]; then
- DOWNLOADER="${DL}"
- elif [ "${OS}" == "cachyos" ]; then
- DOWNLOADER="${DL}"
- elif [ "${OS}" == "garuda" ]; then
- DOWNLOADER="${DL}"
- elif [ "${OS}" == "gentoo" ]; then
- DOWNLOADER="${DL}"
- elif [[ "${OS}" == *"kdeneon"* ]]; then
- DOWNLOADER="${DL}"
+ elif [ "${OS}" == "ubuntu" ] && [ "${RELEASE}" == "canary" ] && [ ${HAS_ZSYNC} -eq 1 ]; then
+ DOWNLOADER="zsync"
+ elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ] && [ ${HAS_ZSYNC} -eq 1 ]; then
+ DOWNLOADER="zsync"
else
- DOWNLOADER="wget"
+ DOWNLOADER="${DL}"
fi
- if [ "${OS}" == "windows" ]; then
+ # If the OS has an editions_() function, use it.
+ if [[ $(type -t "editions_${OS}") == function ]]; then
+ for OPTION in $(editions_"${OS}"); do
+ echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
+ done
+ elif [ "${OS}" == "windows" ]; then
for OPTION in "${LANGS[@]}"; do
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
done
- elif [ "${OS}" == "popos" ]; then
- for OPTION in intel nvidia; do
- echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
- done
- elif [ "${OS}" == "debian" ]; then
- for OPTION in standard nonfree; do
- echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
- done
- elif [ "${OS}" == "alma" ]; then
- for OPTION in minimal dvd; do
- echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
- done
else
echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}"
fi
@@ -194,33 +169,24 @@ function os_support() {
arcolinux \
cachyos \
debian \
+ devuan \
elementary \
- freebsd \
fedora \
+ freebsd \
garuda \
gentoo \
+ ghostbsd \
haiku \
kali \
kdeneon \
kolibrios \
kubuntu \
- linuxmint-cinnamon \
- linuxmint-mate \
- linuxmint-xfce \
- manjaro-xfce \
- manjaro-kde \
- manjaro-gnome \
- manjaro-budgie \
- manjaro-cinnamon \
- manjaro-deepin \
- manjaro-i3 \
- manjaro-mate \
- mxlinux-xfce \
- mxlinux-kde \
- mxlinux-fluxbox \
- nixos-gnome \
- nixos-plasma5 \
- nixos-minimal \
+ linuxmint \
+ manjaro \
+ mxlinux \
+ netboot \
+ netbsd \
+ nixos \
lubuntu \
macos \
openbsd \
@@ -244,11 +210,15 @@ function os_support() {
}
function releases_alma() {
- # consider flavours for boot and dvd as well as
echo 8.4 \
8.5
}
+function editions_alma() {
+ echo minimal \
+ dvd
+}
+
function releases_alpine() {
echo latest \
3.12 \
@@ -273,20 +243,14 @@ function releases_archlinux() {
}
function releases_arcolinux() {
- echo latest
+ echo v21.09.11 \
+ v21.11.05 \
+ v22.01.10
}
-# later refactor these DE variants like languages and avoid the arch ?
-# all these are available with a "nonfree" option too
-function releases_debian() {
- echo cinnamon \
- gnome \
- kde \
- lxde \
- lxqt \
- mate \
- standard \
- xfce
+function editions_arcolinux() {
+ echo large \
+ small
}
function releases_cachyos() {
@@ -294,45 +258,100 @@ function releases_cachyos() {
2022.02.11
}
+function releases_debian() {
+ echo 10.11.0 \
+ 11.2.0
+}
+
+function editions_debian() {
+ echo standard \
+ cinnamon \
+ gnome \
+ kde \
+ lxde \
+ lxqt \
+ mate \
+ xfce
+}
+
+function releases_devuan() {
+ echo beowulf \
+ chimaera
+}
+
function releases_elementary() {
echo 6.1
}
-function releases_freebsd(){
- echo 12.2 \
- 13.0
-}
-
-function releases_fedora(){
+function releases_fedora() {
echo 33 \
34 \
35
}
+function editions_fedora() {
+ echo Workstation \
+ Cinnamon \
+ i3 \
+ KDE \
+ LXDE \
+ LXQt \
+ Mate \
+ Xfce \
+ Silverblue \
+ Server
+}
+
+function releases_freebsd(){
+ echo 12.2 \
+ 12.3 \
+ 13.0
+}
+
+function releases_garuda() {
+ echo 220131 \
+ 220220
+}
+
+function editions_garuda() {
+ echo dr460nized \
+ dr460nized-blackarch \
+ dr460nized-gaming \
+ bspwm \
+ cinnamon \
+ gnome \
+ i3 \
+ kde-barebones \
+ lxqt-kwin \
+ mate \
+ qtile \
+ sway \
+ wayfire \
+ xfce
+}
+
function releases_gentoo(){
echo latest
}
-function releases_garuda() {
- echo bspwm \
- dr460nized \
- dr460nized-blackarch \
- dr460nized-gaming \
- gnome \
- i3 \
- kde-barebones \
- lxqt-kwin \
- qtile \
- sway \
- wayfire \
- xfce \
- mate \
- cinnamon
+function releases_ghostbsd(){
+ echo 21.10.16 \
+ 21.11.24 \
+ 22.01.12
+}
+
+function editions_ghostbsd(){
+ echo mate \
+ xfce
}
function releases_haiku() {
- echo r1beta3-x86_64 \
- r1beta3-x86_gcc2h
+ echo r1beta3
+}
+
+function editions_haiku() {
+ echo x86_64 \
+ x86_gcc2h
}
function releases_kali() {
@@ -355,17 +374,67 @@ function releases_linuxmint(){
echo 20.2
}
+function editions_linuxmint(){
+ echo cinnamon \
+ mate \
+ xfce
+}
+
function releases_mxlinux(){
echo 21
}
+function editions_mxlinux(){
+ echo xfce \
+ kde \
+ fluxbox
+}
+
+function releases_macos() {
+ echo high-sierra \
+ mojave \
+ catalina \
+ big-sur \
+ monterey
+}
+
+function releases_manjaro() {
+ echo xfce \
+ gnome \
+ kde \
+ budgie \
+ cinnamon \
+ deepin \
+ i3 \
+ mate
+}
+
+function releases_netboot() {
+ echo latest
+}
+
+function releases_netbsd() {
+ echo 9.2 \
+ 9.1 \
+ 9.0
+}
+
function releases_nixos(){
echo 21.05 \
21.11
}
+function editions_nixos(){
+ echo gnome \
+ plasma5 \
+ minimal
+}
+
function releases_openbsd(){
- echo 7.0
+ echo 6.7 \
+ 6.8 \
+ 6.9 \
+ 7.0
}
function releases_opensuse(){
@@ -387,37 +456,27 @@ function releases_oraclelinux() {
7.7
}
-function releases_macos() {
- echo high-sierra \
- mojave \
- catalina \
- big-sur \
- monterey
-}
-
-function releases_manjaro() {
- case ${OS} in
- *xfce|*kde|*gnome) echo full \
- minimal \
- minimal-lts;;
- *budgie|*cinnamon|*deepin|*i3|*mate) echo full \
- minimal;;
- esac
-}
-
function releases_popos() {
echo 20.04 \
21.04 \
21.10
}
-function releases_regolith() {
- echo 1.6.0_hirsute \
- 1.6.0_focal \
- 2.0.0_impish \
- 2.0.0_hirsute
+function editions_popos() {
+ echo intel \
+ nvidia
}
+function releases_regolith() {
+ echo focal \
+ hirsute \
+ impish
+}
+
+function editions_regolith() {
+ echo 1.6.0 \
+ 2.0.0
+}
function releases_rockylinux() {
echo 8.5 \
@@ -428,6 +487,11 @@ function releases_rockylinux() {
8.0
}
+function editions_rockylinux() {
+ echo minimal \
+ dvd1
+}
+
function releases_slackware() {
echo 14.2 \
15.0 \
@@ -435,10 +499,14 @@ function releases_slackware() {
}
function releases_solus() {
- echo 4.3-budgie \
- 4.3-gnome \
- 4.3-mate \
- 4.3-plasma
+ echo 4.3
+}
+
+function editions_solus() {
+ echo budgie \
+ gnome \
+ mate \
+ plasma
}
function releases_tails() {
@@ -455,12 +523,22 @@ function releases_ubuntu() {
}
function releases_void() {
- echo base \
+ echo current
+}
+
+function editions_void() {
+ echo glibc \
musl \
- xfce \
+ xfce-glibc \
xfce-musl
}
+function releases_windows() {
+ echo 8 \
+ 10 \
+ 11
+}
+
function languages_windows() {
LANGS=(Arabic
"Brazilian Portuguese"
@@ -502,18 +580,15 @@ function languages_windows() {
Ukrainian)
}
-
-function releases_windows() {
- echo 8 \
- 10 \
- 11
+function releases_zorin() {
+ echo 16
}
-function releases_zorin() {
- echo 16core64 \
- 16lite64 \
- 16education64 \
- 16edulite64
+function editions_zorin() {
+ echo core64 \
+ lite64 \
+ education64 \
+ edulite64
}
function check_hash() {
@@ -559,7 +634,7 @@ function web_get() {
exit 1
fi
- if command -v aria2c > /dev/null; then
+ if command -v aria2c &>/dev/null; then
if ! aria2c -x16 --continue=true --summary-interval=0 --download-result=hide --console-log-level=error "${URL}" -o "${DIR}/${FILE}"; then
echo #Necessary as aria2c in suppressed mode does not have new lines
echo "ERROR! Failed to download ${URL} with aria2c. Try running 'quickget' again."
@@ -579,12 +654,11 @@ function zsync_get() {
local FILE=""
local OUT=""
local URL="${1}"
- FILE="${URL##*/}"
local ZS=""
-# check if we have a zsync installed somewhere
- ZS="$(which zsync)"
- if [ -x "${ZS}" ]; then
+ FILE="${URL##*/}"
+
+ if command -v zsync &>/dev/null; then
if [ -n "${3}" ]; then
OUT="${3}"
else
@@ -605,20 +679,13 @@ function zsync_get() {
rm "${DIR}/${OUT}.zs-old"
fi
else
- echo "INFO: zsync not found, falling back to wget"
+ echo "INFO: zsync not found, falling back to wget/aria2c"
web_get "${ISO}" "${DIR}"
fi
}
-function start_vm_info() {
- echo
- echo "To start your ${OS} ${RELEASE} virtual machine run:"
- echo " quickemu --vm ${OS}-${RELEASE}.conf"
- echo
- exit 0
-}
-
function make_vm_config() {
+ local CONF_FILE=""
local IMAGE_FILE=""
local ISO_FILE=""
local IMAGE_TYPE=""
@@ -628,7 +695,7 @@ function make_vm_config() {
IMAGE_FILE="${1}"
ISO_FILE="${2}"
case "${OS}" in
- freebsd )
+ freebsd|ghostbsd)
GUEST="freebsd"
IMAGE_TYPE="iso";;
haiku)
@@ -637,13 +704,16 @@ function make_vm_config() {
kolibrios)
GUEST="kolibrios"
IMAGE_TYPE="iso";;
- openbsd )
- GUEST="openbsd"
- IMAGE_TYPE="iso";;
- macos )
+ macos)
GUEST="macos"
IMAGE_TYPE="img";;
- windows )
+ netbsd)
+ GUEST="netbsd"
+ IMAGE_TYPE="iso";;
+ openbsd)
+ GUEST="openbsd"
+ IMAGE_TYPE="iso";;
+ windows)
GUEST="windows"
IMAGE_TYPE="iso";;
*)
@@ -651,87 +721,52 @@ function make_vm_config() {
IMAGE_TYPE="iso";;
esac
- if [ -n "${ISOTYPE}" ]; then
- RELEASE=${RELEASE}-${ISOTYPE}
+ if [ -n "${EDITION}" ]; then
+ CONF_FILE="${OS}-${RELEASE}-${EDITION}.conf"
+ else
+ CONF_FILE="${OS}-${RELEASE}.conf"
fi
- if [ ! -e "${OS}-${RELEASE}.conf" ]; then
- echo "Making VM configuration for ${OS}-${RELEASE}..."
- cat << EOF > "${OS}-${RELEASE}.conf"
+ if [ ! -e "${CONF_FILE}" ]; then
+ echo "Making ${CONF_FILE}"
+ cat << EOF > "${CONF_FILE}"
guest_os="${GUEST}"
disk_img="${VM_PATH}/disk.qcow2"
${IMAGE_TYPE}="${VM_PATH}/${IMAGE_FILE}"
EOF
if [ -n "${ISO_FILE}" ]; then
- echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf"
+ echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${CONF_FILE}"
fi
- if [ "${OS}" == "alma" ] && [ "${ISOTYPE}" == "dvd" ]; then
- echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "kolibrios" ]; then
- echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "openbsd" ]; then
- echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "tails" ]; then
- echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "macos" ]; then
- echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "cachyos" ]; then
- echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "garuda" ]; then
- echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "slackware" ]; then
- echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
- echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "haiku" ]; then
- echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
- echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "oraclelinux" ]; then
- echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "void" ]; then
- echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf"
- fi
-
- if [ "${OS}" == "zorin" ]; then
- case ${RELEASE} in
- 15education64|15edulite64|15edulite32)
- echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf";;
- esac
- fi
+ # OS specific tweaks
+ case ${OS} in
+ alma|oraclelinux|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}";;
+ haiku|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";;
+ kolibrios)
+ echo "boot=\"legacy\"" >> "${CONF_FILE}"
+ echo "disk_size=\"2G\"" >> "${CONF_FILE}"
+ echo "ram=\"128M\"" >> "${CONF_FILE}"
+ ;;
+ macos) echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}";;
+ esac
# Enable TPM for Windows 11
if [ "${OS}" == "windows" ] && [ "${RELEASE}" -ge 11 ]; then
- echo "tpm=\"on\"" >> "${OS}-${RELEASE}.conf"
+ echo "tpm=\"on\"" >> "${CONF_FILE}"
# Only force SecureBoot on for non-Debian/Ubuntu distros.
if [ -e "/usr/share/OVMF/OVMF_CODE_4M.fd" ] && [ -e "/usr/share/OVMF/OVMF_VARS_4M.fd" ]; then
SEC_BOOT="off"
else
SEC_BOOT="on"
fi
- echo "secureboot=\"${SEC_BOOT}\"" >> "${OS}-${RELEASE}.conf"
+ echo "secureboot=\"${SEC_BOOT}\"" >> "${CONF_FILE}"
fi
fi
- start_vm_info
+ echo
+ echo "To start your $(pretty_name "${OS}") virtual machine run:"
+ echo " quickemu --vm ${CONF_FILE}"
+ echo
+ exit 0
}
function get_android() {
@@ -739,7 +774,6 @@ function get_android() {
local ISO=""
local URL=""
- validate_release "releases_android"
fosshubVersionInfo=$(wget -O - -q "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =")
version="android-x86-${RELEASE}"
releaseJson=$(echo "${fosshubVersionInfo:16}" | jq --arg ver "${version}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))')
@@ -763,21 +797,17 @@ function get_android() {
}
function get_alma() {
+ local EDITION=""
local HASH=""
local ISO=""
- local ISOTYPE="minimal"
local URL=""
- validate_release "releases_alma"
-
if [ -n "${1}" ]; then
- ISOTYPE="${1}"
+ EDITION="${1}"
fi
- # The mirror url returns 10 or so local mirrors with some kind or RR rotation/load balancing
- # We'll just grab the first
- URL=$(wget -qq -O- "https://mirrors.almalinux.org/isos/x86_64/${RELEASE}.html" | awk -F"
|" '{for(i=2;i<=NF;i+=2) {print $i}}' RS="" | grep href | cut -d'"' -f2 | head -1)
- ISO="AlmaLinux-${RELEASE}-x86_64-${ISOTYPE}.iso"
+ URL="http://lon.mirror.rackspace.com/almalinux/${RELEASE}/isos/x86_64/"
+ ISO="AlmaLinux-${RELEASE}-x86_64-${EDITION}.iso"
HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep \("${ISO}" | cut -d'\' -f4)"
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
@@ -791,18 +821,16 @@ function get_alpine() {
local VERSION=""
local BRANCH=""
- validate_release "releases_alpine"
case ${RELEASE} in
latest) BRANCH="latest-stable";;
*) BRANCH="v${RELEASE}";;
esac
- MANIFESTURL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/latest-releases.yaml"
- VERSION=$(wget -qO- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}')
+ URL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64"
+ VERSION=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}')
ISO="alpine-virt-${VERSION}-x86_64.iso"
- URL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/${ISO}"
- web_get "${URL}" "${VM_PATH}"
- HASH=$(wget -qO- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}')
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ HASH=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}')
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}
@@ -813,7 +841,6 @@ function get_archlinux() {
local URL=""
local VERSION=""
- validate_release "releases_archlinux"
VERSION=$(wget -q -O- 'https://archlinux.org/releng/releases/json/' | jq '.latest_version' | cut -d "\"" -f 2)
URL="https://mirror.rackspace.com/archlinux/iso/${VERSION}"
ISO="archlinux-${VERSION}-x86_64.iso"
@@ -824,16 +851,18 @@ function get_archlinux() {
}
function get_arcolinux() {
+ local EDITION=""
local HASH=""
local ISO=""
local URL=""
- local VERSION=""
- validate_release "releases_arcolinux"
- URL="https://ant.seedhost.eu/arcolinux/.quick/"
- VERSION=$(wget -q -O- "${URL}/info" | cut -d' ' -f 2)
- ISO="arcolinuxl-${VERSION}-x86_64.iso"
- HASH=$(wget -q -O- "${URL}/arcolinuxl-${VERSION}-x86_64.iso.sha1" | cut -d' ' -f 1)
+ if [ -n "${1}" ]; then
+ EDITION="${1:0:1}"
+ fi
+
+ URL="https://ant.seedhost.eu/arcolinux/iso/${RELEASE}"
+ ISO="arcolinux${EDITION}-${RELEASE}-x86_64.iso"
+ HASH=$(wget -q -O- "${URL}/${ISO}.sha1" | cut -d' ' -f 1)
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
@@ -844,32 +873,47 @@ function get_cachyos() {
local ISO=""
local URL="https://mirror.cachyos.org/ISO"
- validate_release "releases_cachyos"
ISO="cachyos-${RELEASE}-x86_64.iso"
web_get "${URL}/${ISO}" "${VM_PATH}"
make_vm_config "${ISO}"
}
function get_debian() {
+ local EDITION=""
local HASH=""
- local HASHLINE=""
local ISO=""
local URL=""
- validate_release "releases_debian"
-
- if [ "${1}" == "nonfree" ]; then
- RELEASE="${RELEASE}+nonfree"
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
fi
case ${RELEASE} in
- *+nonfree) URL="http://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current-live/amd64/iso-hybrid";;
- *) URL="https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid";;
+ 11.2.0) URL="https://cdimage.debian.org/debian-cd/${RELEASE}-live/amd64/iso-hybrid";;
+ *) URL="https://cdimage.debian.org/cdimage/archive/${RELEASE}-live/amd64/iso-hybrid/"
esac
- HASHLINE=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${RELEASE}.iso")
- ISO="$(echo "${HASHLINE}" | awk '{print $NF}')"
- HASH=$(echo "${HASHLINE}" | cut -d'\' -f1)
+ ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso"
+ HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_devuan() {
+ local HASH=""
+ local ISO=""
+ local URL=""
+ local VERSION=""
+
+ case ${RELEASE} in
+ beowulf) VERSION="3.1.1";;
+ chimaera) VERSION="4.0.0";;
+ esac
+
+ URL="https://files.devuan.org/devuan_${RELEASE}/desktop-live"
+ ISO="devuan_${RELEASE}_${VERSION}_amd64_desktop-live.iso"
+ HASH=$(wget -q -O- "${URL}/SHASUMS.txt" | grep "${ISO}" | cut -d' ' -f1)
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
@@ -881,7 +925,6 @@ function get_elementary() {
local URL=""
local B66tim=""
- validate_release "releases_elementary"
B66tim=$(date +%s | base64)
ISO="elementaryos-${RELEASE}-stable.${ISOTAG}.iso"
# TODO: derive region from geoIP
@@ -890,42 +933,65 @@ function get_elementary() {
make_vm_config "${ISO}"
}
-function get_freebsd() {
+function get_fedora() {
+ local EDITION=""
local HASH=""
local ISO=""
+ local JSON=""
local URL=""
+ local VARIANT=""
- validate_release "releases_freebsd"
- ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso"
- HASH=$(wget -q -O- "https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/CHECKSUM.SHA512-FreeBSD-${RELEASE}-RELEASE-amd64" | grep '('"${ISO}"')' | cut -d' ' -f4)
- URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/${ISO}"
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
+
+ case ${EDITION} in
+ Server|Silverblue|Workstation) VARIANT="${EDITION}";;
+ *) VARIANT="Spins";;
+ esac
+
+ JSON=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'")')
+ URL=$(echo "${JSON}" | jq -r '.link' | head -n1)
+ ISO="${URL##*/}"
+ HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1)
web_get "${URL}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}
-function get_fedora() {
- local FEDORA_RELEASE=""
- local FEDORA_VERSIONS=""
+function get_freebsd() {
local HASH=""
local ISO=""
local URL=""
- local VERSION_NUM=""
- validate_release "releases_fedora"
- FEDORA_VERSIONS=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select((.variant=="Workstation" or .variant=="Spins") and .arch=="x86_64")')
- if [[ "${RELEASE}" == *"beta"* ]]; then
- VERSION_NUM=${RELEASE%"_beta"}
- FEDORA_RELEASE=$(echo "${FEDORA_VERSIONS}" | jq -c '. | select(.version | contains("Beta"))' | jq '. | select(.variant=="Workstation")')
- ISO="Fedora-Workstation-Live-x86_64-${VERSION_NUM}_Beta-1.2.iso"
- else
- FEDORA_RELEASE=$(echo "${FEDORA_VERSIONS}" | jq '. | select(.variant=="Workstation" and .version=="'${RELEASE}'")')
- ISO="Fedora-Workstation-Live-x86_64-${RELEASE}-1.2.iso"
+ URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}"
+ ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso"
+ HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA512-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | cut -d' ' -f4)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_garuda() {
+ local BRANCH=""
+ local EDITION=""
+ local HASH=""
+ local ISO=""
+ local URL=""
+
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
fi
- URL=$(echo "${FEDORA_RELEASE}" | jq -r '.link')
- HASH=$(echo "${FEDORA_RELEASE}" | jq -r '.sha256')
- web_get "${URL}" "${VM_PATH}"
+ case ${EDITION} in
+ cinnamon|mate) BRANCH="community";;
+ *) BRANCH="garuda";;
+ esac
+
+ URL="http://mirrors.fossho.st/garuda/iso/${BRANCH}/${EDITION}/${RELEASE}"
+ ISO="${OS}-${EDITION}-linux-zen-${RELEASE}.iso"
+ HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)"
+ web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}
@@ -935,11 +1001,50 @@ function get_gentoo() {
local ISO=""
local URL="https://mirror.bytemark.co.uk/gentoo/releases/amd64/autobuilds/"
- validate_release "releases_gentoo"
ISO=$(wget -q -O- "${URL}/${RELEASE}-iso.txt" | grep install | cut -d' ' -f1)
HASH=$( wget -q -O- "${URL}/${ISO}.DIGESTS" | grep iso | grep -v CONTENTS | cut -d' ' -f1)
web_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "$(basename ${ISO})" "${HASH}"
+ check_hash "$(basename "${ISO}")" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_ghostbsd() {
+ local EDITION=""
+ local ISO=""
+ local URL=""
+ local HASH=""
+
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
+
+ case ${EDITION} in
+ mate) ISO="GhostBSD-${RELEASE}.iso";;
+ xfce) ISO="GhostBSD-${RELEASE}-XFCE.iso";;
+ esac
+
+ URL="https://download.ghostbsd.org/releases/amd64/${RELEASE}"
+ HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f3)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_haiku() {
+ local EDITION=""
+ local ISO=""
+ local URL=""
+ local HASH=""
+
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
+
+ URL="https://cdn.haiku-os.org/haiku-release/${RELEASE}"
+ ISO="haiku-${RELEASE}-${EDITION}-anyboot.iso"
+ HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}
@@ -949,7 +1054,6 @@ function get_kali() {
local URL=""
local SUBDIR=""
- validate_release "releases_kali"
case ${RELEASE} in
latest) SUBDIR="current";;
*) SUBDIR="kali-weekly";;
@@ -964,16 +1068,15 @@ function get_kali() {
}
function get_kdeneon() {
+ local HASH=""
local ISO=""
local URL=""
- validate_release "releases_kdeneon"
- ISO="neon-${RELEASE}-current.iso"
- # Get the URL of the mirror closest to the user's location
- URL=$(wget -q -O- "https://files.kde.org/neon/images/${RELEASE}/current/neon-${RELEASE}-current.iso.zsync.mirrorlist" | \
- grep "neon-${RELEASE}-current.iso.zsync" | grep '>1.<' | cut -d\" -f 6 | sed 's/https/http/g' | xargs dirname)
- zsync_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "${ISO}" "$(wget -q -O- "https://files.kde.org/neon/images/${RELEASE}/current/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f1)"
+ URL="https://files.kde.org/neon/images/${RELEASE}/current"
+ ISO=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f3-)
+ HASH=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f1)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}
@@ -982,267 +1085,23 @@ function get_kolibrios() {
local ISO="kolibri.iso"
local URL="https://builds.kolibrios.org/eng"
- validate_release "releases_kolibrios"
web_get "${URL}/${ISO}" "${VM_PATH}"
make_vm_config "${ISO}"
}
function get_linuxmint() {
- local FLAVOR=""
+ local EDITION=""
local HASH=""
local ISO=""
local URL=""
- validate_release "releases_linuxmint"
- FLAVOR=$(echo "${OS}" | cut -d'-' -f2)
- URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}"
- ISO="linuxmint-${RELEASE}-${FLAVOR}-64bit.iso"
- HASH=$(wget -q -O- "${URL}/${RELEASE}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1)
- web_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-function get_manjaro() {
- local FLAVOR=""
- local MANIFESTURL=""
- local HASH=""
- local ISO=""
- local KEY_ISO=""
- local KEY_HASH=""
- local URL=""
-
- validate_release "releases_manjaro"
- FLAVOR=$(echo "${OS}" | cut -d'-' -f2)
- case ${FLAVOR} in
- gnome|kde|xfce) BRANCH="official";;
- budgie|cinnamon|deepin|i3|mate) BRANCH="community";;
- esac
-
- case ${RELEASE} in
- full)
- KEY_ISO="Download_x64 ="
- KEY_HASH="Download_x64_Checksum ="
- ;;
- minimal)
- KEY_ISO="Download_Minimal_x64 ="
- KEY_HASH="Download_Minimal_x64_Checksum ="
- ;;
- minimal-lts)
- KEY_ISO="Download_Minimal_lts ="
- KEY_HASH="Download_Minimal_x64_Checksum_lts ="
- ;;
- esac
-
- MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/${BRANCH}/${FLAVOR}.md"
- URL="$(wget -qO- "${MANIFESTURL}" | grep "${KEY_ISO}" | cut -d'"' -f2)"
- ISO="${URL##*/}"
- HASH=$(wget -qO- "${MANIFESTURL}" | grep "${KEY_HASH}" | cut -d'"' -f2)
- web_get "${URL}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-function get_mxlinux() {
- local FLAVOR=""
- local HASH=""
- local ISO=""
- local URL=""
-
- validate_release "releases_mxlinux"
- FLAVOR=$(echo "${OS}" | cut -d'-' -f2)
- case ${FLAVOR} in
- xfce)
- URL="https://sourceforge.net/projects/mx-linux/files/Final/Xfce"
- ISO="MX-${RELEASE}_x64.iso"
- ;;
- kde)
- URL="https://sourceforge.net/projects/mx-linux/files/Final/KDE"
- ISO="MX-${RELEASE}_KDE_x64.iso"
- ;;
- fluxbox)
- URL="https://sourceforge.net/projects/mx-linux/files/Final/Fluxbox"
- ISO="MX-${RELEASE}_fluxbox_x64.iso"
- ;;
- esac
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
- web_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-function get_nixos() {
- local FLAVOR=""
- local HASH=""
- local ISO=""
- local URL=""
-
- validate_release "releases_nixos"
- URL="https://channels.nixos.org/nixos-${RELEASE}"
- FLAVOR=$(echo "${OS}" | cut -d'-' -f2)
- ISO="latest-nixos-${FLAVOR}-x86_64-linux.iso"
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
- web_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-function get_openbsd() {
- local HASH=""
- local ISO=""
- local URL=""
-
- validate_release "releases_openbsd"
- URL="https://cdn.openbsd.org/pub/OpenBSD/${RELEASE}/amd64"
- ISO="install${RELEASE//\./}.iso"
- HASH=$(wget -q -O- "${URL}/SHA256" | grep "${ISO}" | cut -d' ' -f4)
- web_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-function get_void() {
- local HASH=""
- local ISO=""
- local URL="https://alpha.de.repo.voidlinux.org/live/current"
-
- validate_release "releases_void"
- DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4)
- case ${RELEASE} in
- base) ISO="void-live-x86_64-${DATE}.iso";;
- musl) ISO="void-live-x86_64-musl-${DATE}.iso";;
- xfce) ISO="void-live-x86_64-${DATE}-xfce.iso";;
- xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";;
- esac
- HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)"
- web_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-function get_zorin() {
- local ISO=""
- local URL=""
-
- validate_release "releases_zorin"
- # their redirector returns an href so we need to get that and parse out the iso
- URL=$(curl -s "https://zrn.co/${RELEASE}" | cut -d'"' -f2)
- ISO=$(echo "${URL}" | awk -F\/ ' {print $NF}')
- web_get "${URL}" "${VM_PATH}"
- make_vm_config "${ISO}"
-}
-
-function get_rocky() {
- local HASH=""
- local ISO=""
- local ISOTYPE="minimal"
- local URL=""
-
- validate_release "releases_rockylinux"
if [ -n "${1}" ]; then
- ISOTYPE="${1}"
- fi
- URL="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/x86_64"
- ISO="Rocky-${RELEASE}-x86_64-${ISOTYPE}.iso"
- HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO}" | cut -d' ' -f4)
- web_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-function get_slackware() {
- local HASH=""
- local ISO=""
- local URL=""
-
- local arch="64"
-
- if [[ "${RELEASE}" == "current" ]]; then
- URL="https://slackware.nl/slackware/slackware${arch}-current-iso/slackware${arch}-current-install-dvd.iso"
- else
- URL="https://mirrors.slackware.com/slackware/slackware-iso/slackware${arch}-${RELEASE}-iso/slackware${arch}-${RELEASE}-install-dvd.iso"
+ EDITION="${1}"
fi
- ISO="slackware${arch}-${RELEASE}-install-dvd.iso"
- HASH=$(wget -q -O- "${URL}.md5" | cut -d' ' -f1)
-
-
- web_get "${URL}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-
-function get_solus() {
- local RELNUM=""
- local RELTYPE=""
- local HASH=""
- local ISO=""
- local URL=""
-
- validate_release "releases_solus"
- RELNUM=$(echo "${RELEASE}" | cut -d'-' -f1)
- RELTYPE=$(echo "${RELEASE}" | cut -d'-' -f2)
- case ${RELTYPE} in
- mate|gnome)
- RELTYPE=${RELTYPE^^};;
- *)
- RELTYPE=${RELTYPE^};;
- esac
-
- ISO="Solus-${RELNUM}-${RELTYPE}.iso"
- URL="https://mirrors.rit.edu/solus/images/${RELNUM}"
- HASH=$(wget -q -O- "${URL}.sha256sum" | cut -d' ' -f1)
- web_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-function get_opensuse() {
- local HASH=""
- local ISO=""
- local URL=""
-
- validate_release "releases_opensuse"
- if [ "${RELEASE}" == "tumbleweed" ]; then
- ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso"
- URL="https://download.opensuse.org/tumbleweed/iso/${ISO}"
- HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
- elif [ "${RELEASE}" == "microos" ]; then
- ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso"
- URL="https://download.opensuse.org/tumbleweed/iso/${ISO}"
- HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
- 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/${ISO}"
- HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
- else
- ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64-Current.iso"
- URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}"
- HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
- fi
- web_get "${URL}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
- make_vm_config "${ISO}"
-}
-
-function get_oraclelinux() {
- local HASH=""
- local ISO=""
- local URL=""
- local VER_MAJ=""
- local VER_MIN=""
-
- validate_release "releases_oraclelinux"
- VER_MAJ=${RELEASE::1}
- VER_MIN=${RELEASE:2:1}
- URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/"
- if [ "${VER_MAJ}" == "8" ]; then
- ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso"
- else
- ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso"
- fi
- HASH=$(wget -q -O- "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut -d' ' -f1)
+ URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}"
+ ISO="linuxmint-${RELEASE}-${EDITION}-64bit.iso"
+ HASH=$(wget -q -O- "${URL}/${RELEASE}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1)
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
@@ -1316,49 +1175,201 @@ function get_macos() {
make_vm_config RecoveryImage.img
}
-function get_popos() {
- local DRIVER="intel"
+function get_manjaro() {
+ local BRANCH=""
+ local HASH=""
+ local ISO=""
+ local KEY_ISO="Download_x64 ="
+ local KEY_HASH="Download_x64_Checksum ="
+ local MANIFESTURL=""
+ local URL=""
+
+ case ${RELEASE} in
+ gnome|kde|xfce) BRANCH="official";;
+ budgie|cinnamon|deepin|i3|mate) BRANCH="community";;
+ esac
+
+ MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/${BRANCH}/${RELEASE}.md"
+ URL="$(wget -qO- "${MANIFESTURL}" | grep "${KEY_ISO}" | cut -d'"' -f2)"
+ ISO="${URL##*/}"
+ HASH=$(wget -qO- "${MANIFESTURL}" | grep "${KEY_HASH}" | cut -d'"' -f2)
+ web_get "${URL}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_mxlinux() {
+ local EDITION=""
local HASH=""
local ISO=""
local URL=""
if [ -n "${1}" ]; then
- DRIVER="${1}"
+ EDITION="${1}"
fi
- validate_release "releases_popos"
- URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${DRIVER}" | jq ".url")
+ case ${EDITION} in
+ xfce)
+ URL="https://sourceforge.net/projects/mx-linux/files/Final/Xfce"
+ ISO="MX-${RELEASE}_x64.iso"
+ ;;
+ kde)
+ URL="https://sourceforge.net/projects/mx-linux/files/Final/KDE"
+ ISO="MX-${RELEASE}_KDE_x64.iso"
+ ;;
+ fluxbox)
+ URL="https://sourceforge.net/projects/mx-linux/files/Final/Fluxbox"
+ ISO="MX-${RELEASE}_fluxbox_x64.iso"
+ ;;
+ esac
+ HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_netboot() {
+ local ISO="netboot.xyz.iso"
+ local HASH=""
+ local URL="https://boot.netboot.xyz/ipxe"
+
+ HASH=$(wget -q -O- "${URL}/netboot.xyz-sha256-checksums.txt" | grep "${ISO}" | cut -d' ' -f1)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_netbsd() {
+ local HASH=""
+ local ISO=""
+ local URL=""
+
+ URL="https://cdn.netbsd.org/pub/NetBSD/NetBSD-${RELEASE}/images/"
+ ISO="NetBSD-${RELEASE}-amd64.iso"
+ HASH=$(wget -q -O- "${URL}/MD5" | grep "${ISO}" | cut -d' ' -f4)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_nixos() {
+ local EDITION=""
+ local HASH=""
+ local ISO=""
+ local URL=""
+
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
+
+ URL="https://channels.nixos.org/nixos-${RELEASE}"
+ ISO="latest-nixos-${EDITION}-x86_64-linux.iso"
+ HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_openbsd() {
+ local HASH=""
+ local ISO=""
+ local URL=""
+
+ URL="https://cdn.openbsd.org/pub/OpenBSD/${RELEASE}/amd64"
+ ISO="install${RELEASE//\./}.iso"
+ HASH=$(wget -q -O- "${URL}/SHA256" | grep "${ISO}" | cut -d' ' -f4)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_opensuse() {
+ 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/${ISO}"
+ HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
+ elif [ "${RELEASE}" == "microos" ]; then
+ ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso"
+ URL="https://download.opensuse.org/tumbleweed/iso/${ISO}"
+ HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
+ 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/${ISO}"
+ HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
+ else
+ ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64-Current.iso"
+ URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}"
+ HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
+ fi
+ web_get "${URL}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_oraclelinux() {
+ local HASH=""
+ local ISO=""
+ local URL=""
+ local VER_MAJ=""
+ local VER_MIN=""
+
+ VER_MAJ=${RELEASE::1}
+ VER_MIN=${RELEASE:2:1}
+ URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/"
+ if [ "${VER_MAJ}" == "8" ]; then
+ ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso"
+ else
+ ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso"
+ fi
+ HASH=$(wget -q -O- "https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64.checksum" | grep "${ISO}" | cut -d' ' -f1)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_popos() {
+ local EDITION=""
+ local HASH=""
+ local ISO=""
+ local URL=""
+
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
+
+ URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq ".url")
URL="${URL//\"/}"
ISO=$(echo "${URL}" | sed -e "s/.*\/\([^\/]*\)$/\1/")
- HASH=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${DRIVER}" | jq ".sha_sum")
+ HASH=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq ".sha_sum")
HASH="${HASH//\"/}"
web_get "${URL}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}
-
function get_regolith() {
+ local EDITION=""
local HASH=""
local ISO=""
- local URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download"
+ local SUBDIR=""
+ local URL=""
- validate_release "releases_regolith"
- case ${RELEASE} in
- 1.6.0_focal)
- URL="${URL}/release-release-focal-focal_standard-1.6.0"
- HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1)
- ;;
- 1.6.0_hirsute)
- URL="${URL}/release-release-hirsute-hirsute_standard-1.6.0"
- HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1)
- ;;
- 2.0.0_impish)
- URL="${URL}/regolith-linux-2.0-impish-latest";;
- 2.0.0_hirsute)
- URL="${URL}/regolith-linux-2.0-hirsute-latest";;
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
+
+ case ${EDITION} in
+ 1.6.0) SUBDIR="release-release-${RELEASE}-${RELEASE}_standard-${EDITION}";;
+ 2.0.0) SUBDIR="regolith-linux-2.0-${RELEASE}-latest";;
esac
- ISO="Regolith_${RELEASE}.iso"
+
+ URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download/${SUBDIR}"
+ ISO="Regolith_${EDITION}_${RELEASE}.iso"
+ HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1)
web_get "${URL}/${ISO}" "${VM_PATH}"
if [ -n "${HASH}" ]; then
check_hash "${ISO}" "${HASH}"
@@ -1366,6 +1377,71 @@ function get_regolith() {
make_vm_config "${ISO}"
}
+function get_rockylinux() {
+ local EDITION=""
+ local HASH=""
+ local ISO=""
+ local URL=""
+
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
+
+ URL="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/x86_64"
+ ISO="Rocky-${RELEASE}-x86_64-${EDITION}.iso"
+ HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO}" | cut -d' ' -f4)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_slackware() {
+ local HASH=""
+ local ISO=""
+ local URL=""
+
+ case ${RELEASE} in
+ current)
+ URL="https://slackware.nl/slackware/slackware64-current-iso"
+ ISO="slackware64-current-install-dvd.iso"
+ ;;
+ *)
+ URL="https://mirrors.slackware.com/slackware/slackware-iso/slackware64-${RELEASE}-iso"
+ ISO="slackware64-${RELEASE}-install-dvd.iso"
+ ;;
+ esac
+
+ HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut -d' ' -f1)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
+function get_solus() {
+ local EDITION=""
+ local HASH=""
+ local ISO=""
+ local URL=""
+
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
+
+ case ${EDITION} in
+ mate|gnome)
+ EDITION=${EDITION^^};;
+ *)
+ EDITION=${EDITION^};;
+ esac
+
+ URL="https://mirrors.rit.edu/solus/images/${RELEASE}"
+ ISO="Solus-${RELEASE}-${EDITION}.iso"
+ HASH=$(wget -q -O- "${URL}.sha256sum" | cut -d' ' -f1)
+ web_get "${URL}/${ISO}" "${VM_PATH}"
+ check_hash "${ISO}" "${HASH}"
+ make_vm_config "${ISO}"
+}
+
function get_tails() {
local ISO=""
local HASH=""
@@ -1373,7 +1449,6 @@ function get_tails() {
local RELEASE_JSON=""
local URL=""
- validate_release "releases_tails"
RELEASE_JSON_URL="https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json"
RELEASE_JSON="$(wget -q -O- "${RELEASE_JSON_URL}")"
URL=$(echo "${RELEASE_JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url')
@@ -1406,8 +1481,6 @@ function get_ubuntu() {
if [ "${RELEASE}" == "canary" ] && [ "${OS}" != "ubuntu" ]; then
echo "ERROR! Canary is currently only available for Ubuntu."
exit 1
- else
- validate_release "releases_ubuntu"
fi
if [ "${RELEASE}" == "canary" ]; then
@@ -1433,50 +1506,42 @@ function get_ubuntu() {
fi
}
-function get_garuda() {
+function get_void() {
local DATE=""
+ local EDITION=""
local HASH=""
local ISO=""
- local URL="http://mirrors.fossho.st/garuda/iso"
- local REL_TYPE=""
- local LATEST_URL=""
- local HASH_URL=""
+ local URL="https://alpha.de.repo.voidlinux.org/live/current"
- validate_release "releases_garuda"
-
- case ${RELEASE} in
- mate|cinnamon)
- REL_TYPE="community";;
- *)
- REL_TYPE="garuda";;
+ DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4)
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
+ case ${EDITION} in
+ glibc) ISO="void-live-x86_64-${DATE}.iso";;
+ musl) ISO="void-live-x86_64-musl-${DATE}.iso";;
+ xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";;
+ xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";;
esac
-
- # Follow daily releases and use SHA hash file to derive .iso and date
- LATEST_URL="${URL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256"
- HASH_URL="$(wget -q -O- "${LATEST_URL}")"
- ISO="$(echo "${HASH_URL}" | awk '{print $NF}')"
- HASH=$(echo "${HASH_URL}" | cut -d' ' -f1)
- DATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' | cut -d'.' -f1)
- URL="${URL}/${REL_TYPE}/${RELEASE}/${DATE}"
+ HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)"
web_get "${URL}/${ISO}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
- make_vm_config "${OS}-${RELEASE}.iso"
+ make_vm_config "${ISO}"
}
-function get_haiku() {
- local BASE=""
+function get_zorin() {
+ local EDITION=""
local ISO=""
local URL=""
- local HASH=""
- validate_release "releases_haiku"
+ if [ -n "${1}" ]; then
+ EDITION="${1}"
+ fi
- BASE=$(echo "${RELEASE}" | cut -d'-' -f1)
- URL="https://cdn.haiku-os.org/haiku-release/${BASE}"
- ISO="haiku-${RELEASE}-anyboot.iso"
- HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4)
- web_get "${URL}/${ISO}" "${VM_PATH}"
- check_hash "${ISO}" "${HASH}"
+ # Parse out the iso URL from the redirector
+ URL=$(wget -q -S -O- --max-redirect=0 "https://zrn.co/${RELEASE}${EDITION}" 2>&1 | grep Location | cut -d' ' -f4)
+ ISO="${URL##*/}"
+ web_get "${URL}" "${VM_PATH}"
make_vm_config "${ISO}"
}
@@ -1796,8 +1861,6 @@ function get_windows() {
local DOWNLOAD_ID=""
local DOWNLOAD_URL=""
- validate_release "releases_windows"
-
# Ignore the most recent Windows 10 release for now.
if [ "${RELEASE}" -eq 10 ]; then
INDEX=0
@@ -1889,226 +1952,89 @@ if [ -n "${1}" ]; then
exit 0
fi
else
- echo "ERROR! You must specify an operating system:"
+ echo "ERROR! You must specify an operating system."
+ echo -n " - Operating Systems: "
os_support
exit 1
fi
+if [[ ! $(os_support) =~ ${OS} ]]; then
+ echo -e "ERROR! ${OS} is not a supported OS.\n"
+ os_support
+ exit 1
+fi
+
if [ -n "${2}" ]; then
RELEASE="${2,,}"
VM_PATH="${OS}-${RELEASE}"
- if [ "${OS}" == "alma" ]; then
+
+ # If the OS has an editions_() function, use it.
+ if [[ $(type -t "editions_${OS}") == function ]]; then
+ EDITIONS=($(editions_${OS}))
+ EDITION=${EDITIONS[0]}
if [ -n "${3}" ]; then
- ISOTYPE="${3,,}"
- ISOTYPES=(minimal dvd)
- if [[ ! ${ISOTYPES[*]} =~ ${ISOTYPE} ]]; then
- echo "iso ${ISOTYPE} is not supported:"
- for ISOTYPE in "${ISOTYPES[@]}"; do
- echo "${ISOTYPE}"
+ EDITION="${3}"
+ if [[ ! ${EDITIONS[*]} =~ ${EDITION} ]]; then
+ echo -e "ERROR! ${EDITION} is not a supported $(pretty_name "${OS}") edition:\n"
+ for EDITION in "${EDITIONS[@]}"; do
+ echo -n "${EDITION} "
done
exit 1
fi
- else
- ISOTYPE="minimal"
fi
- VM_PATH="${OS}-${RELEASE}-${ISOTYPE}"
- get_alma "${ISOTYPE}"
- elif [ "${OS}" == "alpine" ]; then
- get_alpine
- elif [ "${OS}" == "android" ]; then
- get_android
- elif [ "${OS}" == "archlinux" ]; then
- get_archlinux
- elif [ "${OS}" == "arcolinux" ]; then
- get_arcolinux
- elif [ "${OS}" == "void" ]; then
- get_void
- elif [ "${OS}" == "debian" ]; then
- if [ -n "${3}" ]; then
- FREEDOM="${3}"
- FREEDOMS=(standard nonfree)
- if [[ ! ${FREEDOMS[*]} =~ ${FREEDOM} ]]; then
- echo "ERROR! ${FREEDOM} is not a supported freedom:"
- for DRIVER in "${FREEDOMS[@]}"; do
- echo "${FREEDOM}"
- done
- exit 1
- fi
- else
- FREEDOM="standard"
+
+ # Workaround for Regolith
+ if [ "${OS}" == "regolith" ]; then
+ if [ "${RELEASE}" == "focal" ] && [ "${EDITION}" == "2.0.0" ]; then
+ echo "WARNING! $(pretty_name "${OS}") ${EDITION} is not available for ${RELEASE}"
+ EDITION="1.6.0"
+ echo " - Setting edition to: ${EDITION}"
+ elif [ "${RELEASE}" == "impish" ] && [ "${EDITION}" == "1.6.0" ]; then
+ echo "WARNING! $(pretty_name "${OS}") ${EDITION} is not available for ${RELEASE}"
+ EDITION="2.0.0"
+ echo " - Setting edition to: ${EDITION}"
+ fi
fi
- VM_PATH="${OS}-${RELEASE}-${FREEDOM}"
- get_debian "${FREEDOM}"
- elif [ "${OS}" == "elementary" ]; then
- get_elementary
- elif [ "${OS}" == "macos" ]; then
- get_macos
- elif [ "${OS}" == "freebsd" ]; then
- get_freebsd
- elif [ "${OS}" == "fedora" ]; then
- get_fedora
- elif [ "${OS}" == "garuda" ]; then
- get_garuda
- elif [ "${OS}" == "cachyos" ]; then
- get_cachyos
- elif [ "${OS}" == "gentoo" ]; then
- get_gentoo
- elif [ "${OS}" == "haiku" ]; then
- get_haiku
- elif [ "${OS}" == "kali" ]; then
- get_kali
- elif [ "${OS}" == "kdeneon" ]; then
- get_kdeneon
- elif [ "${OS}" == "kolibrios" ]; then
- get_kolibrios
- elif [[ "${OS}" == *"linuxmint-"* ]]; then
- get_linuxmint
- elif [[ "${OS}" == *"manjaro-"* ]]; then
- get_manjaro
- elif [[ "${OS}" == *"mxlinux-"* ]]; then
- get_mxlinux
- elif [[ "${OS}" == *"nixos-"* ]]; then
- get_nixos
- elif [ "${OS}" == "openbsd" ]; then
- get_openbsd
- elif [ "${OS}" == "opensuse" ]; then
- get_opensuse
- elif [ "${OS}" == "oraclelinux" ]; then
- get_oraclelinux
- elif [ "${OS}" == "slackware" ]; then
- get_slackware
- elif [ "${OS}" == "popos" ]; then
- if [ -n "${3}" ]; then
- DRIVER="${3}"
- DRIVERS=(intel nvidia)
- if [[ ! ${DRIVERS[*]} =~ ${DRIVER} ]]; then
- echo "ERROR! ${DRIVER} is not a supported driver:"
- for DRIVER in "${DRIVERS[@]}"; do
- echo "${DRIVER}"
- done
- exit 1
- fi
- else
- DRIVER="intel"
- fi
- VM_PATH="${OS}-${RELEASE}-${DRIVER}"
- get_popos "${DRIVER}"
- elif [ "${OS}" == "regolith" ]; then
- get_regolith
- 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}" == "solus" ]; then
- get_solus
- elif [[ "${OS}" == "tails"* ]]; then
- get_tails
+
+ VM_PATH="${OS}-${RELEASE}-${EDITION}"
+ validate_release releases_"${OS}"
+ get_"${OS}" "${EDITION}"
elif [[ "${OS}" == *"ubuntu"* ]]; then
+ validate_release releases_ubuntu
get_ubuntu
elif [ "${OS}" == "windows" ]; then
+ LANG="English International"
if [ -n "${3}" ]; then
- LANG_NAME="${3}"
- if [[ ! ${LANGS[*]} =~ "${LANG_NAME}" ]]; then
- echo "ERROR! ${LANG_NAME} is not a supported language:"
+ EDITION="${3}"
+ if [[ ! ${LANGS[*]} =~ "${LANG}" ]]; then
+ echo -e "ERROR! ${LANG} is not a supported Windows language:\n"
for LANG in "${LANGS[@]}"; do
- echo "${LANG}"
+ echo -n "${LANG} "
done
exit 1
fi
- else
- LANG_NAME="English International"
fi
- get_windows "${LANG_NAME}"
- elif [ "${OS}" == "zorin" ]; then
- get_zorin
+ validate_release releases_windows
+ get_windows "${LANG}"
else
- echo "ERROR! ${OS} is unknown:"
- os_support
- exit 1
+ validate_release releases_"${OS}"
+ get_"${OS}"
fi
else
- echo -n "ERROR! You must specify a release: "
- if [ "${OS}" == "alma" ]; then
- releases_alma
- elif [ "${OS}" == "alpine" ]; then
- releases_alpine
- elif [ "${OS}" == "android" ]; then
- releases_android
- elif [ "${OS}" == "archlinux" ]; then
- releases_archlinux
- elif [ "${OS}" == "arcolinux" ]; then
- releases_arcolinux
- elif [ "${OS}" == "debian" ]; then
- releases_debian
- elif [ "${OS}" == "elementary" ]; then
- releases_elementary
- elif [ "${OS}" == "freebsd" ]; then
- releases_freebsd
- elif [ "${OS}" == "fedora" ]; then
- releases_fedora
- elif [ "${OS}" == "garuda" ]; then
- releases_garuda
- elif [ "${OS}" == "cachyos" ]; then
- releases_cachyos
- elif [ "${OS}" == "gentoo" ]; then
- releases_gentoo
- elif [ "${OS}" == "haiku" ]; then
- releases_haiku
- elif [ "${OS}" == "kali" ]; then
- releases_kali
- elif [ "${OS}" == "kolibrios" ]; then
- releases_kolibrios
- elif [[ "${OS}" == *"linuxmint-"* ]]; then
- releases_linuxmint
- elif [[ "${OS}" == *"manjaro-"* ]]; then
- releases_manjaro
- elif [[ "${OS}" == *"mxlinux-"* ]]; then
- releases_mxlinux
- elif [[ "${OS}" == *"nixos-"* ]]; then
- releases_nixos
- elif [ "${OS}" == "opensuse" ]; then
- releases_opensuse
- elif [ "${OS}" == "oraclelinux" ]; then
- releases_oraclelinux
- elif [ "${OS}" == "openbsd" ]; then
- releases_openbsd
- elif [ "${OS}" == "macos" ]; then
- releases_macos
- elif [ "${OS}" == "popos" ]; then
- releases_popos
- elif [ "${OS}" == "regolith" ]; then
- releases_regolith
- elif [ "${OS}" == "rockylinux" ]; then
- releases_rockylinux
- elif [ "${OS}" == "slackware" ]; then
- releases_slackware
- elif [ "${OS}" == "solus" ]; then
- releases_solus
- elif [[ "${OS}" == "tails"* ]]; then
- releases_tails
- elif [[ "${OS}" == *"ubuntu"* ]]; then
+ echo "ERROR! You must specify a release."
+ case ${OS} in
+ *ubuntu*)
+ echo -n " - Releases: "
releases_ubuntu
- elif [ "${OS}" == "void" ]; then
- releases_void
- elif [ "${OS}" == "windows" ]; then
- releases_windows
- elif [ "${OS}" == "zorin" ]; then
- releases_zorin
- else
- echo "${OS} is unknown"
- os_support
- fi
+ ;;
+ *)
+ echo -n " - Releases: "
+ releases_"${OS}"
+ if [[ $(type -t "editions_${OS}") == function ]]; then
+ echo -n " - Editions: "
+ editions_"${OS}"
+ fi
+ ;;
+ esac
exit 1
fi