2021-09-27 23:09:46 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2021-12-03 13:42:04 +00:00
|
|
|
|
2021-10-19 15:55:57 +00:00
|
|
|
# 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:
|
|
|
|
# function get_newos() {
|
2021-10-19 16:19:11 +00:00
|
|
|
# local HASH=""
|
2021-10-19 15:55:57 +00:00
|
|
|
# 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}"
|
2021-10-19 16:19:11 +00:00
|
|
|
# web_get "${URL}/SHA256SUMS" "${VM_PATH}"
|
|
|
|
# HASH=$(cat "${VM_PATH}/SHA256SUMS" | cut -d' ' -f1)
|
2021-10-19 19:34:03 +00:00
|
|
|
# check_hash "${ISO}" "${HASH}"
|
2021-10-19 15:55:57 +00:00
|
|
|
# make_vm_config "${ISO}"
|
|
|
|
# }
|
|
|
|
# 6. Add new OS to the argument parser at the bottom of the script
|
|
|
|
|
2021-10-28 21:41:35 +00:00
|
|
|
function cleanup() {
|
|
|
|
if [ -n "$(jobs -p)" ]; then
|
2021-11-17 16:59:47 +00:00
|
|
|
kill "$(jobs -p)"
|
2021-10-28 21:41:35 +00:00
|
|
|
fi
|
|
|
|
}
|
2021-10-21 15:20:26 +00:00
|
|
|
|
2021-10-19 15:32:35 +00:00
|
|
|
function pretty_name() {
|
2021-10-19 16:31:11 +00:00
|
|
|
local SIMPLE_NAME=""
|
2021-10-19 15:32:35 +00:00
|
|
|
local PRETTY_NAME=""
|
2021-10-19 16:31:11 +00:00
|
|
|
SIMPLE_NAME="${1}"
|
|
|
|
case ${SIMPLE_NAME} in
|
2021-12-03 13:42:04 +00:00
|
|
|
alma) PRETTY_NAME="Alma Linux";;
|
2021-12-30 10:23:40 +00:00
|
|
|
alpine) PRETTY_NAME="Alpine Linux";;
|
2021-11-01 18:31:35 +00:00
|
|
|
android) PRETTY_NAME="Android x86";;
|
2021-10-29 09:36:31 +00:00
|
|
|
archlinux) PRETTY_NAME="Arch Linux";;
|
2021-12-20 10:35:54 +00:00
|
|
|
arcolinux) PRETTY_NAME="Arco Linux";;
|
2021-11-22 20:32:38 +00:00
|
|
|
cachyos) PRETTY_NAME="CachyOS";;
|
2021-10-19 16:31:11 +00:00
|
|
|
elementary) PRETTY_NAME="elementary OS";;
|
|
|
|
freebsd) PRETTY_NAME="FreeBSD";;
|
2021-11-28 23:06:23 +00:00
|
|
|
gentoo) PRETTY_NAME="Gentoo";;
|
2021-11-08 00:32:57 +00:00
|
|
|
garuda) PRETTY_NAME="Garuda Linux";;
|
2021-12-26 15:05:38 +00:00
|
|
|
haiku) PRETTY_NAME="Haiku";;
|
2021-11-08 00:03:50 +00:00
|
|
|
kdeneon) PRETTY_NAME="KDE Neon";;
|
2021-12-21 21:13:47 +00:00
|
|
|
kolibrios) PRETTY_NAME="KolibriOS";;
|
2021-10-19 15:32:35 +00:00
|
|
|
linuxmint-cinnamon) PRETTY_NAME="Linux Mint Cinnamon";;
|
2021-10-19 16:31:11 +00:00
|
|
|
linuxmint-mate) PRETTY_NAME="Linux Mint MATE";;
|
|
|
|
linuxmint-xfce) PRETTY_NAME="Linux Mint XFCE";;
|
2021-12-29 12:36:58 +00:00
|
|
|
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";;
|
2022-01-17 02:13:53 +00:00
|
|
|
mxlinux-xfce) PRETTY_NAME="MX Linux XFCE";;
|
|
|
|
mxlinux-kde) PRETTY_NAME="MX Linux KDE";;
|
|
|
|
mxlinux-fluxbox) PRETTY_NAME="MX Linux Fluxbox";;
|
2021-10-25 12:23:05 +00:00
|
|
|
nixos-gnome) PRETTY_NAME="NixOS Gnome";;
|
2021-10-24 21:20:46 +00:00
|
|
|
nixos-plasma5) PRETTY_NAME="NixOS KDE";;
|
2021-10-25 12:23:05 +00:00
|
|
|
nixos-minimal) PRETTY_NAME="NixOS Minimal";;
|
2021-10-19 16:31:11 +00:00
|
|
|
macos) PRETTY_NAME="macOS";;
|
2021-10-20 22:22:35 +00:00
|
|
|
openbsd) PRETTY_NAME="OpenBSD";;
|
2021-10-19 16:50:28 +00:00
|
|
|
opensuse) PRETTY_NAME="openSUSE";;
|
2021-11-16 18:13:22 +00:00
|
|
|
oraclelinux) PRETTY_NAME="Oracle Linux";;
|
2021-10-19 16:31:11 +00:00
|
|
|
popos) PRETTY_NAME="Pop!_OS";;
|
2021-11-08 00:10:02 +00:00
|
|
|
regolith) PRETTY_NAME="Regolith Linux";;
|
2021-11-01 18:10:55 +00:00
|
|
|
rockylinux) PRETTY_NAME="Rocky Linux";;
|
2021-10-19 16:31:11 +00:00
|
|
|
ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";;
|
|
|
|
ubuntu-kylin) PRETTY_NAME="Ubuntu Kylin";;
|
|
|
|
ubuntu-mate) PRETTY_NAME="Ubuntu MATE";;
|
|
|
|
ubuntu-studio) PRETTY_NAME="Ubuntu Studio";;
|
2022-01-16 03:38:45 +00:00
|
|
|
void) PRETTY_NAME="Void Linux";;
|
2021-11-07 23:18:29 +00:00
|
|
|
zorin) PRETTY_NAME="Zorin OS";;
|
2021-10-19 16:31:11 +00:00
|
|
|
*) PRETTY_NAME="${SIMPLE_NAME^}";;
|
2021-10-19 15:32:35 +00:00
|
|
|
esac
|
|
|
|
echo "${PRETTY_NAME}"
|
|
|
|
}
|
2021-10-19 15:33:03 +00:00
|
|
|
|
|
|
|
function validate_release() {
|
|
|
|
local DISPLAY_NAME=""
|
|
|
|
local RELEASE_GENERATOR="${1}"
|
|
|
|
local RELEASES=""
|
|
|
|
|
|
|
|
DISPLAY_NAME="$(pretty_name "${OS}")"
|
|
|
|
RELEASES=$(${RELEASE_GENERATOR})
|
|
|
|
if [[ "${RELEASES}" != *"${RELEASE}"* ]]; then
|
|
|
|
echo "ERROR! ${DISPLAY_NAME} ${RELEASE} is not a supported release."
|
|
|
|
echo "${RELEASES}"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2021-10-19 23:37:46 +00:00
|
|
|
function list_json() {
|
|
|
|
# Reference: https://stackoverflow.com/a/67359273
|
|
|
|
list_csv | jq -R 'split(",") as $h|reduce inputs as $in ([]; . += [$in|split(",")|. as $a|reduce range(0,length) as $i ({};.[$h[$i]]=$a[$i])])'
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2021-10-19 23:35:00 +00:00
|
|
|
function list_csv() {
|
2021-10-19 10:41:57 +00:00
|
|
|
local DISPLAY_NAME
|
2021-10-27 15:32:11 +00:00
|
|
|
local DOWNLOADER
|
2021-10-19 10:41:57 +00:00
|
|
|
local FUNC
|
2021-10-27 15:57:55 +00:00
|
|
|
local OPTION
|
2021-10-19 10:41:57 +00:00
|
|
|
local OS
|
2021-11-13 19:42:46 +00:00
|
|
|
local PNG
|
2021-10-19 10:41:57 +00:00
|
|
|
local RELEASE
|
2021-11-13 19:42:46 +00:00
|
|
|
local SVG
|
2021-11-13 10:50:49 +00:00
|
|
|
local ZS=""
|
|
|
|
local DL=""
|
|
|
|
|
|
|
|
# check if we have a zsync installed somewhere
|
|
|
|
ZS="$(which zsync)"
|
|
|
|
if [ -x "${ZS}" ]; then
|
|
|
|
DL="zsync"
|
|
|
|
else
|
|
|
|
DL="wget"
|
|
|
|
fi
|
2021-11-13 19:42:46 +00:00
|
|
|
echo "Display Name,OS,Release,Option,Downloader,PNG,SVG"
|
2021-10-19 10:41:57 +00:00
|
|
|
for OS in $(os_support); do
|
2021-10-19 15:32:35 +00:00
|
|
|
DISPLAY_NAME="$(pretty_name "${OS}")"
|
2021-10-19 10:41:57 +00:00
|
|
|
if [[ "${OS}" == *"ubuntu"* ]]; then
|
|
|
|
FUNC="ubuntu"
|
2021-10-19 13:53:31 +00:00
|
|
|
elif [[ "${OS}" == *"linuxmint"* ]]; then
|
|
|
|
FUNC="linuxmint"
|
2021-12-29 12:36:58 +00:00
|
|
|
elif [[ "${OS}" == *"manjaro"* ]]; then
|
|
|
|
FUNC="manjaro"
|
2022-01-30 03:56:24 +00:00
|
|
|
elif [[ "${OS}" == *"mxlinux"* ]]; then
|
|
|
|
FUNC="mxlinux"
|
2021-10-28 21:36:41 +00:00
|
|
|
elif [[ "${OS}" == *"nixos"* ]]; then
|
|
|
|
FUNC="nixos"
|
2021-10-19 10:41:57 +00:00
|
|
|
else
|
|
|
|
FUNC="${OS}"
|
|
|
|
fi
|
2021-11-17 11:59:30 +00:00
|
|
|
PNG="https://quickemu-project.github.io/quickemu-icons/png/${FUNC}/${FUNC}-quickemu-white-pinkbg.png"
|
2021-11-18 11:12:27 +00:00
|
|
|
SVG="https://quickemu-project.github.io/quickemu-icons/svg/${FUNC}/${FUNC}-quickemu-white-pinkbg.svg"
|
2021-11-13 19:42:46 +00:00
|
|
|
|
2021-10-19 13:53:31 +00:00
|
|
|
|
2021-10-19 10:41:57 +00:00
|
|
|
for RELEASE in $("releases_${FUNC}"); do
|
2021-10-27 15:32:11 +00:00
|
|
|
if [ "${OS}" == "macos" ]; then
|
|
|
|
DOWNLOADER="macrecovery"
|
2021-10-27 15:57:01 +00:00
|
|
|
elif [ "${OS}" == "ubuntu" ] && [ "${RELEASE}" == "canary" ]; then
|
2021-11-13 10:50:49 +00:00
|
|
|
DOWNLOADER="${DL}"
|
2021-10-27 15:57:01 +00:00
|
|
|
elif [[ "${OS}" == *"ubuntu"* ]] && [ "${RELEASE}" == "devel" ]; then
|
2021-11-13 10:50:49 +00:00
|
|
|
DOWNLOADER="${DL}"
|
2021-11-21 19:54:34 +00:00
|
|
|
elif [ "${OS}" == "cachyos" ]; then
|
|
|
|
DOWNLOADER="${DL}"
|
2021-11-08 00:32:57 +00:00
|
|
|
elif [ "${OS}" == "garuda" ]; then
|
2021-11-13 10:50:49 +00:00
|
|
|
DOWNLOADER="${DL}"
|
2021-11-29 04:00:55 +00:00
|
|
|
elif [ "${OS}" == "gentoo" ]; then
|
|
|
|
DOWNLOADER="${DL}"
|
2021-11-08 00:03:08 +00:00
|
|
|
elif [[ "${OS}" == *"kdeneon"* ]]; then
|
2021-11-13 10:50:49 +00:00
|
|
|
DOWNLOADER="${DL}"
|
2021-10-27 15:32:11 +00:00
|
|
|
else
|
|
|
|
DOWNLOADER="wget"
|
|
|
|
fi
|
|
|
|
|
2021-10-19 10:41:57 +00:00
|
|
|
if [ "${OS}" == "windows" ]; then
|
2021-10-27 15:57:55 +00:00
|
|
|
for OPTION in "${LANGS[@]}"; do
|
2021-11-13 19:42:46 +00:00
|
|
|
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
|
2021-10-19 10:41:57 +00:00
|
|
|
done
|
2021-10-19 19:36:05 +00:00
|
|
|
elif [ "${OS}" == "popos" ]; then
|
2021-10-27 15:57:55 +00:00
|
|
|
for OPTION in intel nvidia; do
|
2021-11-13 19:42:46 +00:00
|
|
|
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
|
2021-10-19 19:36:05 +00:00
|
|
|
done
|
2021-12-03 13:42:04 +00:00
|
|
|
elif [ "${OS}" == "debian" ]; then
|
2021-11-19 23:39:25 +00:00
|
|
|
for OPTION in standard nonfree; do
|
2021-12-03 13:42:04 +00:00
|
|
|
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
|
|
|
|
done
|
|
|
|
elif [ "${OS}" == "alma" ]; then
|
|
|
|
for OPTION in minimal dvd; do
|
2021-11-19 23:39:25 +00:00
|
|
|
echo "${DISPLAY_NAME},${OS},${RELEASE},${OPTION},${DOWNLOADER},${PNG},${SVG}"
|
|
|
|
done
|
2021-10-19 10:41:57 +00:00
|
|
|
else
|
2021-11-13 19:42:46 +00:00
|
|
|
echo "${DISPLAY_NAME},${OS},${RELEASE},,${DOWNLOADER},${PNG},${SVG}"
|
2021-10-19 10:41:57 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
done
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
function os_support() {
|
2021-12-03 13:42:04 +00:00
|
|
|
echo alma \
|
2021-12-30 10:23:04 +00:00
|
|
|
alpine \
|
2021-12-03 13:42:04 +00:00
|
|
|
android \
|
2021-10-29 13:50:45 +00:00
|
|
|
archlinux \
|
2021-12-20 10:35:54 +00:00
|
|
|
arcolinux \
|
2021-11-22 20:32:38 +00:00
|
|
|
cachyos \
|
2021-11-19 22:01:27 +00:00
|
|
|
debian \
|
2021-10-29 09:36:31 +00:00
|
|
|
elementary \
|
2021-10-19 10:41:57 +00:00
|
|
|
freebsd \
|
2021-10-19 11:04:16 +00:00
|
|
|
fedora \
|
2021-11-08 00:32:57 +00:00
|
|
|
garuda \
|
2021-11-28 23:06:23 +00:00
|
|
|
gentoo \
|
2021-12-26 15:05:38 +00:00
|
|
|
haiku \
|
2021-10-25 10:32:22 +00:00
|
|
|
kali \
|
2021-11-07 23:39:20 +00:00
|
|
|
kdeneon \
|
2021-12-21 21:13:47 +00:00
|
|
|
kolibrios \
|
2021-10-07 15:22:45 +00:00
|
|
|
kubuntu \
|
2021-10-19 13:53:31 +00:00
|
|
|
linuxmint-cinnamon \
|
|
|
|
linuxmint-mate \
|
|
|
|
linuxmint-xfce \
|
2021-12-29 12:36:58 +00:00
|
|
|
manjaro-xfce \
|
|
|
|
manjaro-kde \
|
|
|
|
manjaro-gnome \
|
|
|
|
manjaro-budgie \
|
|
|
|
manjaro-cinnamon \
|
|
|
|
manjaro-deepin \
|
|
|
|
manjaro-i3 \
|
|
|
|
manjaro-mate \
|
2021-12-27 07:06:28 +00:00
|
|
|
mxlinux-xfce \
|
|
|
|
mxlinux-kde \
|
|
|
|
mxlinux-fluxbox \
|
2021-10-24 21:20:46 +00:00
|
|
|
nixos-gnome \
|
|
|
|
nixos-plasma5 \
|
|
|
|
nixos-minimal \
|
2021-09-27 23:09:46 +00:00
|
|
|
lubuntu \
|
|
|
|
macos \
|
2021-10-20 21:07:07 +00:00
|
|
|
openbsd \
|
2021-10-16 18:27:45 +00:00
|
|
|
opensuse \
|
2021-11-16 18:13:22 +00:00
|
|
|
oraclelinux \
|
2021-10-19 11:04:00 +00:00
|
|
|
popos \
|
2021-11-08 00:10:02 +00:00
|
|
|
regolith \
|
2021-11-01 18:10:55 +00:00
|
|
|
rockylinux \
|
2021-11-07 23:41:39 +00:00
|
|
|
solus \
|
2022-01-05 16:50:09 +00:00
|
|
|
tails \
|
2021-09-27 23:09:46 +00:00
|
|
|
ubuntu \
|
2021-09-28 01:14:30 +00:00
|
|
|
ubuntu-budgie \
|
2021-09-27 23:09:46 +00:00
|
|
|
ubuntu-kylin \
|
|
|
|
ubuntu-mate \
|
|
|
|
ubuntu-studio \
|
2022-01-16 03:38:45 +00:00
|
|
|
void \
|
2021-09-28 04:03:16 +00:00
|
|
|
windows \
|
2021-11-07 23:18:29 +00:00
|
|
|
xubuntu \
|
|
|
|
zorin
|
2021-09-27 23:09:46 +00:00
|
|
|
}
|
|
|
|
|
2021-12-03 13:42:04 +00:00
|
|
|
function releases_alma() {
|
|
|
|
# consider flavours for boot and dvd as well as
|
|
|
|
echo 8.4 \
|
|
|
|
8.5
|
|
|
|
}
|
|
|
|
|
2021-12-30 10:23:04 +00:00
|
|
|
function releases_alpine() {
|
|
|
|
echo latest \
|
|
|
|
3.12 \
|
|
|
|
3.13 \
|
|
|
|
3.14 \
|
|
|
|
3.15
|
|
|
|
}
|
|
|
|
|
2021-10-29 13:50:45 +00:00
|
|
|
function releases_android() {
|
2021-11-01 18:31:35 +00:00
|
|
|
echo 9.0 \
|
|
|
|
8.1 \
|
2021-10-29 13:50:45 +00:00
|
|
|
7.1 \
|
|
|
|
6.0 \
|
|
|
|
5.1 \
|
|
|
|
4.4 \
|
|
|
|
4.0 \
|
|
|
|
2.2
|
|
|
|
}
|
|
|
|
|
2021-10-29 09:36:31 +00:00
|
|
|
function releases_archlinux() {
|
|
|
|
echo latest
|
|
|
|
}
|
|
|
|
|
2021-12-20 10:35:54 +00:00
|
|
|
function releases_arcolinux() {
|
|
|
|
echo latest
|
|
|
|
}
|
|
|
|
|
2021-11-19 22:01:27 +00:00
|
|
|
# later refactor these DE variants like languages and avoid the arch ?
|
2021-11-19 23:39:25 +00:00
|
|
|
# all these are available with a "nonfree" option too
|
2021-11-19 22:01:27 +00:00
|
|
|
function releases_debian() {
|
2022-01-29 15:10:57 +00:00
|
|
|
echo cinnamon \
|
|
|
|
gnome \
|
|
|
|
kde \
|
|
|
|
lxde \
|
|
|
|
lxqt \
|
|
|
|
mate \
|
|
|
|
standard \
|
|
|
|
xfce
|
2021-11-19 22:01:27 +00:00
|
|
|
}
|
|
|
|
|
2021-11-22 20:32:38 +00:00
|
|
|
function releases_cachyos() {
|
2022-01-17 03:42:51 +00:00
|
|
|
echo 2022.01.09
|
2021-11-22 20:32:38 +00:00
|
|
|
}
|
2021-11-19 22:01:27 +00:00
|
|
|
|
2021-10-19 11:04:16 +00:00
|
|
|
function releases_elementary() {
|
2022-01-17 00:48:40 +00:00
|
|
|
echo 6.1
|
2021-10-19 11:04:16 +00:00
|
|
|
}
|
|
|
|
|
2021-10-07 15:22:45 +00:00
|
|
|
function releases_freebsd(){
|
2021-10-19 13:59:21 +00:00
|
|
|
echo 12.2 \
|
|
|
|
13.0
|
2021-10-07 15:22:45 +00:00
|
|
|
}
|
|
|
|
|
2021-10-13 19:12:33 +00:00
|
|
|
function releases_fedora(){
|
|
|
|
echo 33 \
|
|
|
|
34 \
|
2021-11-02 18:55:27 +00:00
|
|
|
35
|
2021-10-13 19:12:33 +00:00
|
|
|
}
|
|
|
|
|
2021-11-28 23:06:23 +00:00
|
|
|
function releases_gentoo(){
|
|
|
|
echo latest
|
|
|
|
}
|
|
|
|
|
2021-11-08 00:32:57 +00:00
|
|
|
function releases_garuda() {
|
|
|
|
echo bspwm \
|
|
|
|
dr460nized \
|
|
|
|
dr460nized-blackarch \
|
|
|
|
dr460nized-gaming \
|
|
|
|
gnome \
|
|
|
|
i3 \
|
|
|
|
kde-barebones \
|
|
|
|
lxqt-kwin \
|
|
|
|
qtile \
|
|
|
|
sway \
|
|
|
|
wayfire \
|
|
|
|
xfce \
|
|
|
|
mate \
|
|
|
|
cinnamon
|
|
|
|
}
|
|
|
|
|
2021-12-26 15:05:38 +00:00
|
|
|
function releases_haiku() {
|
|
|
|
echo r1beta3-x86_64 \
|
|
|
|
r1beta3-x86_gcc2h
|
|
|
|
}
|
|
|
|
|
2021-10-25 10:32:22 +00:00
|
|
|
function releases_kali() {
|
|
|
|
echo latest \
|
|
|
|
weekly
|
|
|
|
}
|
|
|
|
|
2021-11-07 23:39:20 +00:00
|
|
|
function releases_kdeneon() {
|
|
|
|
echo user \
|
|
|
|
testing \
|
|
|
|
unstable \
|
|
|
|
developer
|
|
|
|
}
|
|
|
|
|
2021-12-21 21:13:47 +00:00
|
|
|
function releases_kolibrios() {
|
2022-01-17 05:38:57 +00:00
|
|
|
echo latest
|
2021-12-21 21:13:47 +00:00
|
|
|
}
|
|
|
|
|
2021-10-16 19:58:53 +00:00
|
|
|
function releases_linuxmint(){
|
2021-10-19 13:53:31 +00:00
|
|
|
echo 20.2
|
2021-10-16 19:58:53 +00:00
|
|
|
}
|
|
|
|
|
2021-12-27 07:06:28 +00:00
|
|
|
function releases_mxlinux(){
|
|
|
|
echo 21
|
|
|
|
}
|
|
|
|
|
2021-10-24 21:20:46 +00:00
|
|
|
function releases_nixos(){
|
2021-12-07 19:00:22 +00:00
|
|
|
echo 21.05 \
|
|
|
|
21.11
|
2021-10-24 21:20:46 +00:00
|
|
|
}
|
|
|
|
|
2021-10-20 21:07:07 +00:00
|
|
|
function releases_openbsd(){
|
2021-10-20 22:22:35 +00:00
|
|
|
echo 7.0
|
2021-10-20 21:07:07 +00:00
|
|
|
}
|
|
|
|
|
2021-10-16 18:27:45 +00:00
|
|
|
function releases_opensuse(){
|
2021-10-19 14:00:07 +00:00
|
|
|
echo 15.0 \
|
|
|
|
15.1 \
|
|
|
|
15.2 \
|
|
|
|
15.3 \
|
2021-10-19 10:41:57 +00:00
|
|
|
microos \
|
|
|
|
tumbleweed
|
2021-10-16 18:27:45 +00:00
|
|
|
}
|
|
|
|
|
2021-11-16 18:13:22 +00:00
|
|
|
function releases_oraclelinux() {
|
2021-11-17 13:52:29 +00:00
|
|
|
echo 8.5 \
|
|
|
|
8.4 \
|
2021-11-16 18:13:22 +00:00
|
|
|
8.3 \
|
2021-11-17 03:42:53 +00:00
|
|
|
8.2 \
|
|
|
|
7.9 \
|
|
|
|
7.8 \
|
|
|
|
7.7
|
2021-11-16 18:13:22 +00:00
|
|
|
}
|
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
function releases_macos() {
|
2021-09-28 14:25:38 +00:00
|
|
|
echo high-sierra \
|
|
|
|
mojave \
|
2021-09-27 23:09:46 +00:00
|
|
|
catalina \
|
2021-10-27 10:56:56 +00:00
|
|
|
big-sur \
|
|
|
|
monterey
|
2021-09-27 23:09:46 +00:00
|
|
|
}
|
|
|
|
|
2021-12-29 12:36:58 +00:00
|
|
|
function releases_manjaro() {
|
|
|
|
case ${OS} in
|
|
|
|
*xfce|*kde|*gnome) echo full \
|
|
|
|
minimal \
|
|
|
|
minimal-lts;;
|
|
|
|
*budgie|*cinnamon|*deepin|*i3|*mate) echo full \
|
|
|
|
minimal;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
2021-10-19 11:04:00 +00:00
|
|
|
function releases_popos() {
|
2021-10-19 14:01:19 +00:00
|
|
|
echo 20.04 \
|
2021-12-16 12:00:01 +00:00
|
|
|
21.04 \
|
|
|
|
21.10
|
2021-10-19 11:04:00 +00:00
|
|
|
}
|
|
|
|
|
2021-11-08 00:10:02 +00:00
|
|
|
function releases_regolith() {
|
|
|
|
echo 1.6.0_hirsute \
|
|
|
|
1.6.0_focal \
|
|
|
|
2.0.0_impish \
|
|
|
|
2.0.0_hirsute
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-11-01 18:10:55 +00:00
|
|
|
function releases_rockylinux() {
|
2021-11-17 16:18:18 +00:00
|
|
|
echo 8.5 \
|
|
|
|
8.4 \
|
2021-11-01 18:10:55 +00:00
|
|
|
8.3 \
|
|
|
|
8.2 \
|
|
|
|
8.1 \
|
|
|
|
8.0
|
|
|
|
}
|
|
|
|
|
2021-11-07 23:41:39 +00:00
|
|
|
function releases_solus() {
|
|
|
|
echo 4.3-budgie \
|
|
|
|
4.3-gnome \
|
|
|
|
4.3-mate \
|
|
|
|
4.3-plasma
|
|
|
|
}
|
|
|
|
|
2022-01-05 16:50:09 +00:00
|
|
|
function releases_tails() {
|
|
|
|
echo stable
|
|
|
|
}
|
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
function releases_ubuntu() {
|
|
|
|
echo bionic \
|
|
|
|
focal \
|
|
|
|
hirsute \
|
2021-10-15 00:20:50 +00:00
|
|
|
impish \
|
2021-10-21 17:46:02 +00:00
|
|
|
devel \
|
|
|
|
canary
|
2021-09-27 23:09:46 +00:00
|
|
|
}
|
|
|
|
|
2022-01-16 03:38:45 +00:00
|
|
|
function releases_void() {
|
2022-01-31 00:25:02 +00:00
|
|
|
echo base \
|
|
|
|
musl \
|
|
|
|
xfce \
|
|
|
|
xfce-musl
|
2022-01-16 03:38:45 +00:00
|
|
|
}
|
|
|
|
|
2021-09-28 04:03:16 +00:00
|
|
|
function languages_windows() {
|
2021-10-19 10:41:57 +00:00
|
|
|
LANGS=(Arabic
|
|
|
|
"Brazilian Portuguese"
|
|
|
|
Bulgarian
|
|
|
|
"Chinese (Simplified)"
|
|
|
|
"Chinese (Traditional)"
|
|
|
|
Croatian
|
|
|
|
Czech
|
|
|
|
Danish
|
|
|
|
Dutch
|
|
|
|
English
|
|
|
|
"English International"
|
|
|
|
Estonian
|
|
|
|
Finnish
|
|
|
|
French
|
|
|
|
"French Canadian"
|
|
|
|
German
|
|
|
|
Greek
|
|
|
|
Hebrew
|
|
|
|
Hungarian
|
|
|
|
Italian
|
|
|
|
Japanese
|
|
|
|
Korean
|
|
|
|
Latvian
|
|
|
|
Lithuanian
|
|
|
|
Norwegian
|
|
|
|
Polish
|
|
|
|
Portuguese
|
|
|
|
Romanian
|
|
|
|
Russian
|
|
|
|
"Serbian Latin"
|
|
|
|
Slovak
|
|
|
|
Slovenian
|
|
|
|
Spanish
|
|
|
|
"Spanish (Mexico)"
|
|
|
|
Swedish
|
|
|
|
Thai
|
|
|
|
Turkish
|
|
|
|
Ukrainian)
|
2021-09-28 04:03:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function releases_windows() {
|
2021-10-05 22:51:57 +00:00
|
|
|
echo 8 \
|
|
|
|
10 \
|
|
|
|
11
|
2021-09-28 04:03:16 +00:00
|
|
|
}
|
|
|
|
|
2021-11-07 23:18:29 +00:00
|
|
|
function releases_zorin() {
|
|
|
|
echo 16core64 \
|
|
|
|
15lite64 \
|
|
|
|
15lite32 \
|
|
|
|
15education64 \
|
|
|
|
15edulite64 \
|
|
|
|
15edulite32
|
|
|
|
}
|
|
|
|
|
2021-12-06 15:20:48 +00:00
|
|
|
function check_hash() {
|
|
|
|
local iso=""
|
|
|
|
local hash=""
|
|
|
|
local hash_algo=""
|
|
|
|
iso="${VM_PATH}/${1}"
|
|
|
|
hash="${2}"
|
2021-10-08 01:04:30 +00:00
|
|
|
|
2021-12-06 15:20:48 +00:00
|
|
|
# Guess the hash algorithm by the hash length
|
|
|
|
case ${#hash} in
|
|
|
|
32) hash_algo=md5sum;;
|
|
|
|
40) hash_algo=sha1sum;;
|
|
|
|
64) hash_algo=sha256sum;;
|
|
|
|
128) hash_algo=sha512sum;;
|
|
|
|
*) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash."
|
|
|
|
return;;
|
|
|
|
esac
|
2021-10-08 01:04:30 +00:00
|
|
|
|
2021-12-06 15:20:48 +00:00
|
|
|
echo -n "Checking ${iso} with ${hash_algo}... "
|
|
|
|
if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then
|
|
|
|
echo "ERROR!"
|
|
|
|
echo "${iso} doesn't match ${hash}. Try running 'quickget' again."
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo "Good!"
|
|
|
|
fi
|
|
|
|
}
|
2021-12-06 10:58:24 +00:00
|
|
|
|
2021-12-06 15:20:48 +00:00
|
|
|
function web_get() {
|
|
|
|
local DIR="${2}"
|
|
|
|
local FILE=""
|
|
|
|
local URL="${1}"
|
2021-12-06 10:58:24 +00:00
|
|
|
|
2021-12-06 15:20:48 +00:00
|
|
|
if [ -n "${3}" ]; then
|
|
|
|
FILE="${3}"
|
|
|
|
else
|
|
|
|
FILE="${URL##*/}"
|
|
|
|
fi
|
2021-10-08 01:04:30 +00:00
|
|
|
|
2021-12-06 15:20:48 +00:00
|
|
|
if ! mkdir -p "${DIR}" 2>/dev/null; then
|
|
|
|
echo "ERROR! Unable to create directory ${DIR}"
|
|
|
|
exit 1
|
|
|
|
fi
|
2021-10-08 01:04:30 +00:00
|
|
|
|
2022-02-17 10:06:47 +00:00
|
|
|
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 doesnot have new lines
|
|
|
|
echo "ERROR! Failed to download ${URL}. Try running 'quickget' again."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
echo #Necessary as aria2c in suppressed mode doesnot have new lines
|
2022-02-17 10:14:17 +00:00
|
|
|
else
|
2022-02-17 10:06:47 +00:00
|
|
|
if ! wget --quiet --continue --show-progress --progress=bar:force:noscroll "${URL}" -O "${DIR}/${FILE}"; then
|
|
|
|
echo "ERROR! Failed to download ${URL}. Try running 'quickget' again."
|
|
|
|
exit 1
|
|
|
|
fi
|
2021-12-06 15:20:48 +00:00
|
|
|
fi
|
|
|
|
}
|
2021-10-08 01:04:30 +00:00
|
|
|
|
2021-12-06 15:20:48 +00:00
|
|
|
function zsync_get() {
|
|
|
|
local DIR="${2}"
|
|
|
|
local FILE=""
|
|
|
|
local OUT=""
|
|
|
|
local URL="${1}"
|
|
|
|
FILE="${URL##*/}"
|
|
|
|
local ZS=""
|
2021-09-28 01:13:08 +00:00
|
|
|
|
2021-11-13 10:50:49 +00:00
|
|
|
# check if we have a zsync installed somewhere
|
|
|
|
ZS="$(which zsync)"
|
|
|
|
if [ -x "${ZS}" ]; then
|
|
|
|
if [ -n "${3}" ]; then
|
|
|
|
OUT="${3}"
|
|
|
|
else
|
|
|
|
OUT="${FILE}"
|
|
|
|
fi
|
2021-10-19 16:30:51 +00:00
|
|
|
|
2021-11-13 10:50:49 +00:00
|
|
|
if ! mkdir -p "${DIR}" 2>/dev/null; then
|
|
|
|
echo "ERROR! Unable to create directory ${DIR}"
|
2021-09-27 23:09:46 +00:00
|
|
|
exit 1
|
2021-11-13 10:50:49 +00:00
|
|
|
fi
|
2021-09-27 23:09:46 +00:00
|
|
|
|
2021-11-13 10:50:49 +00:00
|
|
|
if ! zsync "${URL}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then
|
|
|
|
echo "ERROR! Failed to download ${URL}.zsync"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -e "${DIR}/${OUT}.zs-old" ]; then
|
|
|
|
rm "${DIR}/${OUT}.zs-old"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo "INFO: zsync not found, falling back to wget"
|
2022-01-06 11:09:25 +00:00
|
|
|
web_get "${ISO}" "${DIR}"
|
2021-09-27 23:09:46 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2021-10-19 15:44:07 +00:00
|
|
|
function start_vm_info() {
|
|
|
|
echo
|
|
|
|
echo "To start your ${OS} ${RELEASE} virtual machine run:"
|
|
|
|
echo " quickemu --vm ${OS}-${RELEASE}.conf"
|
|
|
|
echo
|
|
|
|
}
|
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
function make_vm_config() {
|
|
|
|
local IMAGE_FILE=""
|
2021-09-28 14:32:12 +00:00
|
|
|
local ISO_FILE=""
|
2021-09-27 23:09:46 +00:00
|
|
|
local IMAGE_TYPE=""
|
|
|
|
local GUEST=""
|
2021-10-25 15:13:53 +00:00
|
|
|
local SEC_BOOT=""
|
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
IMAGE_FILE="${1}"
|
2021-09-28 14:32:12 +00:00
|
|
|
ISO_FILE="${2}"
|
2022-02-17 10:03:31 +00:00
|
|
|
case "${OS}" in
|
2022-02-17 10:14:17 +00:00
|
|
|
alma | android | archlinux | debian | elementary | fedora | kali | \
|
|
|
|
garuda | kdeneon | linuxmint* | nixos* | opensuse | oraclelinux | \
|
|
|
|
popos | regolith | rockylinux | solus | *ubuntu* | zorin )
|
2022-02-17 10:03:31 +00:00
|
|
|
GUEST="linux"
|
|
|
|
IMAGE_TYPE="iso";;
|
|
|
|
freebsd )
|
|
|
|
GUEST="freebsd"
|
|
|
|
IMAGE_TYPE="iso";;
|
2022-02-17 10:14:03 +00:00
|
|
|
haiku)
|
|
|
|
GUEST="haiku"
|
|
|
|
IMAGE_TYPE="iso";;
|
|
|
|
kolibrios)
|
|
|
|
GUEST="kolibrios"
|
|
|
|
IMAGE_TYPE="iso";;
|
2022-02-17 10:03:31 +00:00
|
|
|
openbsd )
|
|
|
|
GUEST="openbsd"
|
|
|
|
IMAGE_TYPE="iso";;
|
|
|
|
macos )
|
|
|
|
GUEST="macos"
|
|
|
|
IMAGE_TYPE="img";;
|
|
|
|
windows )
|
|
|
|
GUEST="windows"
|
|
|
|
IMAGE_TYPE="iso";;
|
|
|
|
*)
|
|
|
|
echo "Undefined OS Defaulting to Guest=Linux and IMAGE_TYPE=iso"
|
|
|
|
GUEST="linux"
|
|
|
|
IMAGE_TYPE="iso";;
|
|
|
|
esac
|
2021-12-03 13:42:04 +00:00
|
|
|
|
|
|
|
if [ -n "${ISOTYPE}" ]; then
|
|
|
|
RELEASE=${RELEASE}-${ISOTYPE}
|
|
|
|
fi
|
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
if [ ! -e "${OS}-${RELEASE}.conf" ]; then
|
|
|
|
echo "Making VM configuration for ${OS}-${RELEASE}..."
|
|
|
|
cat << EOF > "${OS}-${RELEASE}.conf"
|
|
|
|
guest_os="${GUEST}"
|
|
|
|
disk_img="${VM_PATH}/disk.qcow2"
|
2021-09-28 04:03:16 +00:00
|
|
|
${IMAGE_TYPE}="${VM_PATH}/${IMAGE_FILE}"
|
2021-09-27 23:09:46 +00:00
|
|
|
EOF
|
2021-09-28 14:32:12 +00:00
|
|
|
if [ -n "${ISO_FILE}" ]; then
|
|
|
|
echo "fixed_iso=\"${VM_PATH}/${ISO_FILE}\"" >> "${OS}-${RELEASE}.conf"
|
2021-09-28 04:03:16 +00:00
|
|
|
fi
|
2021-12-21 21:13:47 +00:00
|
|
|
|
2021-12-03 13:42:04 +00:00
|
|
|
if [ "${OS}" == "alma" ] && [ ${ISOTYPE} == "dvd" ]; then
|
|
|
|
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
|
|
|
|
fi
|
2021-12-21 21:13:47 +00:00
|
|
|
|
|
|
|
if [ "${OS}" == "kolibrios" ]; then
|
|
|
|
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
|
|
|
|
fi
|
|
|
|
|
2021-10-20 22:22:35 +00:00
|
|
|
if [ "${OS}" == "openbsd" ]; then
|
|
|
|
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
|
|
|
|
fi
|
|
|
|
|
2022-01-05 16:50:09 +00:00
|
|
|
if [ "${OS}" == "tails" ]; then
|
|
|
|
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
|
|
|
|
fi
|
|
|
|
|
2021-10-04 16:34:31 +00:00
|
|
|
if [ "${OS}" == "macos" ]; then
|
|
|
|
echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf"
|
|
|
|
fi
|
2021-11-08 00:50:38 +00:00
|
|
|
|
2021-11-21 19:54:34 +00:00
|
|
|
if [ "${OS}" == "cachyos" ]; then
|
|
|
|
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
|
|
|
|
fi
|
|
|
|
|
2021-11-08 00:32:57 +00:00
|
|
|
if [ "${OS}" == "garuda" ]; then
|
|
|
|
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
|
2021-11-08 00:50:38 +00:00
|
|
|
fi
|
|
|
|
|
2021-12-26 15:05:38 +00:00
|
|
|
if [ "${OS}" == "haiku" ]; then
|
|
|
|
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
|
2021-12-26 17:27:17 +00:00
|
|
|
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf"
|
2021-12-26 15:05:38 +00:00
|
|
|
fi
|
|
|
|
|
2021-11-16 19:46:00 +00:00
|
|
|
if [ "${OS}" == "oraclelinux" ]; then
|
2021-11-16 20:12:03 +00:00
|
|
|
echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf"
|
2021-11-16 19:46:00 +00:00
|
|
|
fi
|
|
|
|
|
2022-01-16 03:38:45 +00:00
|
|
|
if [ "${OS}" == "void" ]; then
|
|
|
|
echo "disk_size=\"20G\"" >> "${OS}-${RELEASE}.conf"
|
|
|
|
fi
|
|
|
|
|
2021-11-08 00:03:50 +00:00
|
|
|
if [ "${OS}" == "zorin" ]; then
|
2021-11-07 23:18:29 +00:00
|
|
|
case ${RELEASE} in
|
|
|
|
15education64|15edulite64|15edulite32)
|
|
|
|
echo "disk_size=\"32G\"" >> "${OS}-${RELEASE}.conf";;
|
2021-11-08 00:03:50 +00:00
|
|
|
esac
|
2021-11-07 23:18:29 +00:00
|
|
|
fi
|
2021-10-06 10:01:33 +00:00
|
|
|
|
|
|
|
# Enable TPM for Windows 11
|
2021-10-19 15:38:43 +00:00
|
|
|
if [ "${OS}" == "windows" ] && [ "${RELEASE}" -ge 11 ]; then
|
2021-10-06 10:01:33 +00:00
|
|
|
echo "tpm=\"on\"" >> "${OS}-${RELEASE}.conf"
|
2021-10-25 15:13:53 +00:00
|
|
|
# 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"
|
2021-10-06 10:01:33 +00:00
|
|
|
fi
|
2021-09-27 23:09:46 +00:00
|
|
|
fi
|
2021-10-19 15:44:07 +00:00
|
|
|
start_vm_info
|
2021-09-27 23:09:46 +00:00
|
|
|
}
|
|
|
|
|
2021-10-29 13:50:45 +00:00
|
|
|
function get_android() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
|
|
|
|
validate_release "releases_android"
|
2021-11-05 16:45:45 +00:00
|
|
|
fosshubVersionInfo=$(wget -O - -q "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =")
|
|
|
|
version="android-x86-${RELEASE}"
|
2021-11-17 16:59:47 +00:00
|
|
|
releaseJson=$(echo "${fosshubVersionInfo:16}" | jq --arg ver "${version}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))')
|
2021-10-29 13:50:45 +00:00
|
|
|
|
|
|
|
HASH=$(echo "${releaseJson}" | jq -r .hash.sha256)
|
|
|
|
ISO=$(echo "${releaseJson}" | jq -r .n)
|
|
|
|
|
|
|
|
baseurl="https://mirrors.gigenet.com/OSDN/android-x86/"
|
|
|
|
|
2021-11-17 16:59:47 +00:00
|
|
|
releaseFolders=$(wget -q -O - ${baseurl} | grep -o -E '[0-9]{5}' | uniq)
|
2021-10-29 13:50:45 +00:00
|
|
|
for item in $releaseFolders; do
|
2021-11-17 16:59:47 +00:00
|
|
|
file=$(wget -O - -q "${baseurl}${item}" | grep "${ISO}")
|
2021-10-29 13:50:45 +00:00
|
|
|
if [[ $file != "" ]]; then
|
|
|
|
URL="${baseurl}${item}/${ISO}"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-12-03 13:42:04 +00:00
|
|
|
function get_alma() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local VERSION=""
|
|
|
|
#local isotype=""
|
|
|
|
|
|
|
|
validate_release "releases_alma"
|
|
|
|
|
|
|
|
ISOTYPE="minimal" # boot is a step too far for now - needs setting install source to mirror tree ... nope
|
|
|
|
if [ -n "${1}" ]; then
|
|
|
|
ISOTYPE="${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
|
|
|
|
|
2021-12-06 10:22:58 +00:00
|
|
|
URL=$(wget -qq -O- "https://mirrors.almalinux.org/isos/x86_64/${RELEASE}.html" | awk -F"<li>|</li>" '{for(i=2;i<=NF;i+=2) {print $i}}' RS="" |grep href|cut -d\" -f2|head -1)
|
2021-12-03 13:42:04 +00:00
|
|
|
|
|
|
|
#VM_PATH="${VM_PATH}"-${ISOTYPE}
|
|
|
|
ISO=AlmaLinux-${RELEASE}-x86_64-${ISOTYPE}.iso
|
2021-12-06 10:22:58 +00:00
|
|
|
HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep \(${ISO} | cut -d\ -f4)"
|
2021-12-03 13:42:04 +00:00
|
|
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
2021-12-30 10:23:04 +00:00
|
|
|
|
|
|
|
function get_alpine() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local VERSION=""
|
|
|
|
local BRANCH=""
|
2022-01-17 02:13:53 +00:00
|
|
|
|
2021-12-30 10:23:04 +00:00
|
|
|
validate_release "releases_alpine"
|
|
|
|
if [[ "${RELEASE}" == "latest" ]]; then
|
|
|
|
BRANCH="latest-stable"
|
|
|
|
else
|
|
|
|
BRANCH="v${RELEASE}"
|
|
|
|
fi
|
2021-12-31 11:35:00 +00:00
|
|
|
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}')
|
2021-12-30 10:23:04 +00:00
|
|
|
ISO="alpine-virt-${VERSION}-x86_64.iso"
|
|
|
|
URL="https://dl-cdn.alpinelinux.org/alpine/${BRANCH}/releases/x86_64/${ISO}"
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
2021-12-31 11:35:00 +00:00
|
|
|
HASH=$(wget -qO- "${MANIFESTURL}" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'sha256:' | awk '{print $2}')
|
2021-12-30 10:23:04 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-10-29 09:36:31 +00:00
|
|
|
function get_archlinux() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
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)
|
2021-10-29 10:26:44 +00:00
|
|
|
URL="https://mirror.rackspace.com/archlinux/iso/${VERSION}"
|
|
|
|
ISO="archlinux-${VERSION}-x86_64.iso"
|
2021-10-29 09:36:31 +00:00
|
|
|
HASH=$(wget -q -O- 'https://archlinux.org/releng/releases/json/' | jq '.releases[0].sha1_sum' | cut -d "\"" -f 2)
|
|
|
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-12-20 10:35:54 +00:00
|
|
|
function get_arcolinux() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local VERSION=""
|
|
|
|
|
|
|
|
validate_release "releases_arcolinux"
|
|
|
|
VERSION=$(wget -q -O- 'https://ant.seedhost.eu/arcolinux/.quick/info' | cut -d " " -f 2)
|
|
|
|
URL="https://ant.seedhost.eu/arcolinux/.quick/"
|
|
|
|
ISO="arcolinuxl-${VERSION}-x86_64.iso"
|
|
|
|
HASH=$(wget -q -O- 'https://ant.seedhost.eu/arcolinux/.quick/arcolinuxl-'${VERSION}'-x86_64.iso.sha1' | cut -d " " -f 1)
|
|
|
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
2021-11-19 22:01:27 +00:00
|
|
|
|
2022-01-17 03:42:51 +00:00
|
|
|
|
|
|
|
function get_cachyos() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local VERSION=""
|
|
|
|
|
|
|
|
validate_release "releases_cachyos"
|
|
|
|
#ISO="cachyos-cli-${RELEASE}-x86_64.iso"
|
|
|
|
ISO="cachyos-${RELEASE}-x86_64.iso"
|
|
|
|
URL="https://mirror.cachyos.org/ISO"
|
|
|
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
2021-11-19 22:01:27 +00:00
|
|
|
|
|
|
|
function get_debian() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local HASHLINE=""
|
2021-11-19 23:39:25 +00:00
|
|
|
local FREEDOM=""
|
|
|
|
|
2021-11-19 22:01:27 +00:00
|
|
|
|
|
|
|
validate_release "releases_debian"
|
2021-11-19 23:39:25 +00:00
|
|
|
|
|
|
|
if [ "${1}" == "nonfree" ]; then
|
|
|
|
RELEASE="${RELEASE}+nonfree"
|
|
|
|
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";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
2021-11-19 22:01:27 +00:00
|
|
|
HASHLINE=$(wget -q -O- ${URL}/SHA512SUMS |grep ${RELEASE}.iso)
|
|
|
|
ISO="$(echo ${HASHLINE} | awk '{print $NF}' )"
|
|
|
|
HASH=$(echo ${HASHLINE} | cut -d\ -f1)
|
|
|
|
|
|
|
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-10-19 11:04:16 +00:00
|
|
|
function get_elementary() {
|
2021-10-19 13:58:57 +00:00
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
2021-10-28 06:27:40 +00:00
|
|
|
local B66tim=""
|
2022-01-17 01:03:43 +00:00
|
|
|
local isotag="20211218-rc"
|
2021-10-19 13:58:57 +00:00
|
|
|
|
2021-10-19 15:38:19 +00:00
|
|
|
validate_release "releases_elementary"
|
2021-10-28 06:27:40 +00:00
|
|
|
B66tim=$(date +%s | base64 )
|
2022-01-17 01:03:43 +00:00
|
|
|
ISO="elementaryos-${RELEASE}-stable.${isotag}.iso"
|
2021-10-28 21:42:31 +00:00
|
|
|
# TODO: derive region from geoIP
|
2021-10-28 06:27:40 +00:00
|
|
|
URL="https://ams3.dl.elementary.io/download/${B66tim}=/${ISO}"
|
2021-10-19 13:49:47 +00:00
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
make_vm_config "${ISO}"
|
2021-10-19 11:04:16 +00:00
|
|
|
}
|
|
|
|
|
2021-10-07 15:22:45 +00:00
|
|
|
function get_freebsd() {
|
2021-10-21 00:13:43 +00:00
|
|
|
local HASH=""
|
2021-10-19 13:59:21 +00:00
|
|
|
local ISO=""
|
2021-10-07 15:22:45 +00:00
|
|
|
local URL=""
|
2021-10-07 15:36:38 +00:00
|
|
|
|
2021-10-19 15:38:19 +00:00
|
|
|
validate_release "releases_freebsd"
|
2021-10-19 13:59:21 +00:00
|
|
|
ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso"
|
2021-10-21 00:13:43 +00:00
|
|
|
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)
|
2021-10-19 13:59:21 +00:00
|
|
|
URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}/${ISO}"
|
2021-10-19 13:49:47 +00:00
|
|
|
web_get "${URL}" "${VM_PATH}"
|
2021-10-21 00:13:43 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
2021-10-19 13:49:47 +00:00
|
|
|
make_vm_config "${ISO}"
|
2021-10-07 15:22:45 +00:00
|
|
|
}
|
|
|
|
|
2021-10-13 19:12:33 +00:00
|
|
|
function get_fedora() {
|
2021-10-19 14:01:43 +00:00
|
|
|
local FEDORA_RELEASE=""
|
|
|
|
local FEDORA_VERSIONS=""
|
2021-10-19 16:20:05 +00:00
|
|
|
local HASH=""
|
2021-10-19 14:01:43 +00:00
|
|
|
local ISO=""
|
2021-10-13 19:12:33 +00:00
|
|
|
local URL=""
|
2021-10-19 14:01:43 +00:00
|
|
|
local VERSION_NUM=""
|
|
|
|
|
2021-10-19 15:38:19 +00:00
|
|
|
validate_release "releases_fedora"
|
2021-10-13 19:12:33 +00:00
|
|
|
|
|
|
|
FEDORA_VERSIONS=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select((.variant=="Workstation" or .variant=="Spins") and .arch=="x86_64")')
|
2021-10-19 14:01:43 +00:00
|
|
|
if [[ "${RELEASE}" == *"beta"* ]]; then
|
|
|
|
VERSION_NUM=${RELEASE%"_beta"}
|
|
|
|
FEDORA_RELEASE=$(echo "${FEDORA_VERSIONS}" | jq -c '. | select(.version | contains("Beta"))' | jq '. | select(.variant=="Workstation")')
|
2021-10-13 19:12:33 +00:00
|
|
|
ISO="Fedora-Workstation-Live-x86_64-${VERSION_NUM}_Beta-1.2.iso"
|
|
|
|
else
|
2021-10-19 14:01:43 +00:00
|
|
|
FEDORA_RELEASE=$(echo "${FEDORA_VERSIONS}" | jq '. | select(.variant=="Workstation" and .version=="'${RELEASE}'")')
|
|
|
|
ISO="Fedora-Workstation-Live-x86_64-${RELEASE}-1.2.iso"
|
2021-10-13 19:12:33 +00:00
|
|
|
fi
|
2021-10-15 00:45:05 +00:00
|
|
|
|
2021-10-19 13:49:47 +00:00
|
|
|
URL=$(echo "${FEDORA_RELEASE}" | jq -r '.link')
|
2021-10-19 16:20:05 +00:00
|
|
|
HASH=$(echo "${FEDORA_RELEASE}" | jq -r '.sha256')
|
2021-10-19 13:49:47 +00:00
|
|
|
web_get "${URL}" "${VM_PATH}"
|
2021-10-19 19:34:03 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
2021-10-19 13:49:47 +00:00
|
|
|
make_vm_config "${ISO}"
|
2021-10-13 19:12:33 +00:00
|
|
|
}
|
|
|
|
|
2021-11-28 23:06:23 +00:00
|
|
|
function get_gentoo() {
|
2021-11-29 04:00:55 +00:00
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local LOCAT=""
|
|
|
|
local INSTALLMIN=""
|
|
|
|
|
|
|
|
validate_release "releases_gentoo"
|
|
|
|
eval $( wget -O/tmp/gentoolatest https://bouncer.gentoo.org/fetch/root/all/releases/amd64/autobuilds/${RELEASE}-iso.txt 2>&1 |grep Location | awk '{print "LOCAT="$2}' )
|
|
|
|
LOCAT=$(dirname ${LOCAT})
|
|
|
|
eval $( awk '/admincd-amd64/ {print "ADMIN="$1}; /install-amd64-minimal/ {print "INSTALLMIN="$1}' /tmp/gentoolatest )
|
|
|
|
URL="${LOCAT}/${INSTALLMIN}"
|
|
|
|
ISO=$(basename "${INSTALLMIN}" )
|
|
|
|
|
|
|
|
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
HASH=$(wget -q -O- ${LOCAT}/${INSTALLMIN}.DIGESTS|grep -e iso|grep -v -e CONT -e catalyst|cut -d\ -f1)
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
2021-11-28 23:06:23 +00:00
|
|
|
}
|
|
|
|
|
2021-10-25 10:32:22 +00:00
|
|
|
function get_kali() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local SUBDIR=""
|
|
|
|
validate_release "releases_kali"
|
|
|
|
|
|
|
|
if [[ "${RELEASE}" == "latest" ]]; then
|
|
|
|
SUBDIR="current"
|
|
|
|
else
|
2021-11-05 16:45:45 +00:00
|
|
|
SUBDIR="kali-weekly"
|
2021-10-25 10:32:22 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
ISO=$(wget -q -O- "https://cdimage.kali.org/${SUBDIR}/?C=M;O=D" |grep -o ">kali-linux-.*-installer-amd64.iso"|head -n 1|cut -c 2-)
|
|
|
|
HASH=$(wget -q -O- "https://cdimage.kali.org/${SUBDIR}/SHA256SUMS" | grep "${ISO}" | cut -d' ' -f1)
|
|
|
|
URL="https://cdimage.kali.org/${SUBDIR}/${ISO}"
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-11-07 23:39:20 +00:00
|
|
|
function get_kdeneon() {
|
|
|
|
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)"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-12-21 21:13:47 +00:00
|
|
|
function get_kolibrios() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
|
|
|
|
validate_release "releases_kolibrios"
|
2022-01-17 05:38:57 +00:00
|
|
|
#URL="https://builds.kolibrios.org/eng/${RELEASE}.7z"
|
|
|
|
ISO="kolibri.iso"
|
|
|
|
URL="https://builds.kolibrios.org/eng/${ISO}"
|
2021-12-21 21:13:47 +00:00
|
|
|
web_get "${URL}" "${VM_PATH}"
|
2022-01-17 05:38:57 +00:00
|
|
|
#7z e "${VM_PATH}/${RELEASE}.7z" "kolibri.iso"
|
|
|
|
#ISO="kolibrios-${RELEASE}.iso"
|
|
|
|
#mv "kolibri.iso" "${VM_PATH}/${ISO}"
|
|
|
|
#rm "${VM_PATH}/${RELEASE}.7z"
|
2021-12-21 21:13:47 +00:00
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-10-16 19:58:53 +00:00
|
|
|
function get_linuxmint() {
|
2021-10-19 13:53:31 +00:00
|
|
|
local FLAVOR=""
|
2021-10-20 23:54:45 +00:00
|
|
|
local HASH=""
|
2021-10-19 13:53:31 +00:00
|
|
|
local ISO=""
|
2021-10-16 19:58:53 +00:00
|
|
|
local URL=""
|
|
|
|
|
2021-10-19 15:38:19 +00:00
|
|
|
validate_release "releases_linuxmint"
|
2021-10-19 13:53:31 +00:00
|
|
|
FLAVOR=$(echo "${OS}" | cut -d'-' -f2)
|
|
|
|
ISO="linuxmint-${RELEASE}-${FLAVOR}-64bit.iso"
|
2021-10-20 23:54:45 +00:00
|
|
|
HASH=$(wget -q -O- "https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1)
|
|
|
|
URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}/${ISO}"
|
2021-10-19 13:49:47 +00:00
|
|
|
web_get "${URL}" "${VM_PATH}"
|
2021-10-20 23:54:45 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
2021-10-19 13:49:47 +00:00
|
|
|
make_vm_config "${ISO}"
|
2022-01-16 03:38:45 +00:00
|
|
|
|
2021-10-16 19:58:53 +00:00
|
|
|
}
|
2021-12-29 12:36:58 +00:00
|
|
|
|
|
|
|
function get_manjaro() {
|
|
|
|
local FLAVOR=""
|
2022-01-01 06:20:17 +00:00
|
|
|
local MANIFESTURL=""
|
2022-01-17 02:13:53 +00:00
|
|
|
# local ISOKEY=""
|
2022-01-01 06:20:17 +00:00
|
|
|
local HASHKEY=""
|
2021-12-29 12:36:58 +00:00
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
2022-01-17 02:13:53 +00:00
|
|
|
|
2021-12-29 12:36:58 +00:00
|
|
|
validate_release "releases_manjaro"
|
|
|
|
FLAVOR=$(echo "${OS}" | cut -d'-' -f2)
|
|
|
|
case ${FLAVOR} in
|
2022-01-01 06:20:17 +00:00
|
|
|
xfce|kde|gnome) BRANCH="official";;
|
|
|
|
budgie|cinnamon|deepin|i3|mate) BRANCH="community";;
|
2021-12-29 12:36:58 +00:00
|
|
|
esac
|
2022-01-17 02:13:53 +00:00
|
|
|
|
2021-12-29 12:36:58 +00:00
|
|
|
if [[ ${RELEASE} == "full" ]]; then
|
2022-01-01 06:20:17 +00:00
|
|
|
KEY="Download_x64 = "
|
|
|
|
HASHKEY="Download_x64_Checksum = "
|
2021-12-29 12:36:58 +00:00
|
|
|
elif [[ ${RELEASE} == "minimal" ]]; then
|
2022-01-01 06:20:17 +00:00
|
|
|
KEY="Download_Minimal_x64 = "
|
|
|
|
HASHKEY="Download_Minimal_x64_Checksum = "
|
|
|
|
elif [[ ${RELEASE} == "minimal" ]]; then
|
|
|
|
KEY="Download_Minimal_lts = "
|
|
|
|
HASHKEY="Download_Minimal_x64_Checksum_lts = "
|
2021-12-29 12:36:58 +00:00
|
|
|
fi
|
2022-01-17 02:13:53 +00:00
|
|
|
|
2022-01-01 06:20:17 +00:00
|
|
|
MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/${BRANCH}/${FLAVOR}.md"
|
2022-01-01 06:28:38 +00:00
|
|
|
URL="$(wget -qO- ${MANIFESTURL} | grep "${KEY}" | awk '{print $3}' | tr -d '"')"
|
|
|
|
ISO="$(echo $URL | awk -F "/" '{print $6}')"
|
2022-01-01 06:20:17 +00:00
|
|
|
HASH=$(wget -qO- ${MANIFESTURL} | grep "${HASHKEY}" | awk '{print $3}' | tr -d '"')
|
2021-12-29 12:36:58 +00:00
|
|
|
web_get "${URL}" "${VM_PATH}"
|
2022-01-01 06:20:17 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
2021-12-29 12:36:58 +00:00
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-12-27 07:06:28 +00:00
|
|
|
function get_mxlinux() {
|
|
|
|
local FLAVOR=""
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
2021-12-31 17:24:57 +00:00
|
|
|
local BASE_URL=""
|
2021-12-27 07:06:28 +00:00
|
|
|
|
|
|
|
validate_release "releases_mxlinux"
|
|
|
|
FLAVOR=$(echo "${OS}" | cut -d'-' -f2)
|
|
|
|
|
|
|
|
if [[ "$FLAVOR" == "xfce" ]]; then
|
|
|
|
ISO="MX-${RELEASE}_x64.iso"
|
2022-01-31 10:56:24 +00:00
|
|
|
BASE_URL="https://sourceforge.net/projects/mx-linux/files/Final/Xfce/"
|
2021-12-27 07:06:28 +00:00
|
|
|
elif [[ "$FLAVOR" == "kde" ]]; then
|
|
|
|
ISO="MX-${RELEASE}_KDE_x64.iso"
|
2022-01-31 10:56:24 +00:00
|
|
|
BASE_URL="https://sourceforge.net/projects/mx-linux/files/Final/KDE/"
|
2021-12-27 07:06:28 +00:00
|
|
|
elif [[ "$FLAVOR" == "fluxbox" ]]; then
|
|
|
|
ISO="MX-${RELEASE}_fluxbox_x64.iso"
|
2022-01-31 10:56:24 +00:00
|
|
|
BASE_URL="https://sourceforge.net/projects/mx-linux/files/Final/Fluxbox/"
|
2021-12-27 07:06:28 +00:00
|
|
|
fi
|
2022-01-17 02:13:53 +00:00
|
|
|
|
2021-12-27 07:06:28 +00:00
|
|
|
URL="${BASE_URL}/${ISO}"
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
web_get "${URL}.sha256" "${VM_PATH}"
|
|
|
|
HASH=$(cat "${VM_PATH}/${ISO}.sha256" | cut -d' ' -f1)
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-10-24 21:20:46 +00:00
|
|
|
function get_nixos() {
|
|
|
|
local FLAVOR=""
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
2021-10-16 19:58:53 +00:00
|
|
|
|
2021-10-24 21:20:46 +00:00
|
|
|
validate_release "releases_nixos"
|
|
|
|
FLAVOR=$(echo "${OS}" | cut -d'-' -f2)
|
|
|
|
ISO="latest-nixos-${FLAVOR}-x86_64-linux.iso"
|
|
|
|
URL="https://channels.nixos.org/nixos-${RELEASE}/${ISO}"
|
|
|
|
HASH=$(wget -q -O- "https://channels.nixos.org/nixos-${RELEASE}/${ISO}.sha256" | cut -d' ' -f1)
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
2022-01-16 03:38:45 +00:00
|
|
|
|
2021-10-24 21:20:46 +00:00
|
|
|
}
|
2021-10-20 21:07:07 +00:00
|
|
|
function get_openbsd() {
|
2021-10-20 22:22:35 +00:00
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
2021-10-20 21:07:07 +00:00
|
|
|
local URL=""
|
|
|
|
|
2021-10-20 22:22:35 +00:00
|
|
|
validate_release "releases_openbsd"
|
|
|
|
ISO="install${RELEASE//\./}.iso"
|
|
|
|
URL="https://cdn.openbsd.org/pub/OpenBSD/${RELEASE}/amd64/${ISO}"
|
|
|
|
HASH=$(wget -q -O- "https://cdn.openbsd.org/pub/OpenBSD/${RELEASE}/amd64/SHA256" | grep "${ISO}" | cut -d' ' -f4)
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
2021-10-20 21:07:07 +00:00
|
|
|
}
|
|
|
|
|
2022-01-16 03:38:45 +00:00
|
|
|
function get_void() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
2022-01-31 00:15:53 +00:00
|
|
|
local HASH_URL=""
|
|
|
|
|
2022-01-16 03:38:45 +00:00
|
|
|
validate_release "releases_void"
|
2022-01-31 00:15:53 +00:00
|
|
|
DATE=$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | awk 'NR == 1' |cut -d'.' -f1| cut -d'-' -f4)
|
|
|
|
URL="http://mirror.fit.cvut.cz/voidlinux/live/current"
|
|
|
|
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
|
|
|
|
case ${RELEASE} in
|
|
|
|
base)
|
|
|
|
HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-${DATE}.iso" | cut -d' ' -f4)";;
|
|
|
|
musl)
|
|
|
|
HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-musl-${DATE}.iso" | cut -d' ' -f4)";;
|
|
|
|
xfce)
|
|
|
|
HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-${DATE}-xfce.iso" | cut -d' ' -f4)";;
|
|
|
|
xfce-musl)
|
|
|
|
HASH="$(wget -q -O- "https://mirror.fit.cvut.cz/voidlinux/live/current/sha256sum.txt" | grep "void-live-x86_64-musl-${DATE}.iso" | cut -d' ' -f4)";;
|
|
|
|
esac
|
2022-01-16 03:38:45 +00:00
|
|
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-11-07 23:18:29 +00:00
|
|
|
function get_zorin() {
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
|
|
|
|
validate_release "releases_zorin"
|
2021-11-08 00:03:50 +00:00
|
|
|
# their redirector returns an href so we need to get that and parse out the iso
|
2021-11-17 16:59:47 +00:00
|
|
|
URL=$(curl -s "https://zrn.co/${RELEASE}" |cut -d\" -f2)
|
|
|
|
ISO=$(echo "${URL}"| awk -F\/ ' {print $NF}')
|
2021-11-07 23:18:29 +00:00
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-11-01 18:10:55 +00:00
|
|
|
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}"
|
|
|
|
}
|
|
|
|
|
2021-11-07 23:41:39 +00:00
|
|
|
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}/${ISO}"
|
|
|
|
HASH=$(wget -q -O- "${URL}.sha256sum" | cut -d' ' -f1)
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
2021-11-01 18:10:55 +00:00
|
|
|
|
2021-10-16 18:27:45 +00:00
|
|
|
function get_opensuse() {
|
2021-10-20 23:56:25 +00:00
|
|
|
local HASH=""
|
2021-10-19 14:00:07 +00:00
|
|
|
local ISO=""
|
2021-10-16 18:27:45 +00:00
|
|
|
local URL=""
|
|
|
|
|
2021-10-19 15:38:19 +00:00
|
|
|
validate_release "releases_opensuse"
|
2021-10-19 14:00:07 +00:00
|
|
|
if [ "${RELEASE}" == "tumbleweed" ]; then
|
2021-10-16 18:27:45 +00:00
|
|
|
ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso"
|
2021-10-19 14:00:07 +00:00
|
|
|
URL="https://download.opensuse.org/tumbleweed/iso/${ISO}"
|
2021-10-20 23:56:25 +00:00
|
|
|
HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
|
2021-10-19 14:00:07 +00:00
|
|
|
elif [ "${RELEASE}" == "microos" ]; then
|
2021-10-18 11:30:06 +00:00
|
|
|
ISO="openSUSE-MicroOS-DVD-x86_64-Current.iso"
|
2021-10-19 14:00:07 +00:00
|
|
|
URL="https://download.opensuse.org/tumbleweed/iso/${ISO}"
|
2021-10-20 23:56:25 +00:00
|
|
|
HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
|
2021-12-13 16:31:37 +00:00
|
|
|
elif [ "$RELEASE" == 15.0 ] || [ "$RELEASE" == 15.1 ]; then
|
2021-10-19 14:00:07 +00:00
|
|
|
ISO="openSUSE-Leap-${RELEASE}-DVD-x86_64.iso"
|
|
|
|
URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso/${ISO}"
|
2021-10-20 23:56:25 +00:00
|
|
|
HASH=$(wget -q -O- "${URL}.sha256" | cut -d' ' -f1)
|
2021-12-13 16:31:37 +00:00
|
|
|
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)
|
2021-10-16 18:27:45 +00:00
|
|
|
fi
|
2021-10-19 13:49:47 +00:00
|
|
|
web_get "${URL}" "${VM_PATH}"
|
2021-10-20 23:56:25 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
2021-10-19 13:49:47 +00:00
|
|
|
make_vm_config "${ISO}"
|
2021-10-16 18:27:45 +00:00
|
|
|
}
|
|
|
|
|
2021-11-16 18:13:22 +00:00
|
|
|
function get_oraclelinux() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
2021-12-03 13:42:04 +00:00
|
|
|
|
2021-11-16 18:13:22 +00:00
|
|
|
local arch="x86_64"
|
2021-12-03 13:42:04 +00:00
|
|
|
|
2021-11-17 03:42:53 +00:00
|
|
|
validate_release "releases_oraclelinux"
|
|
|
|
|
2021-11-16 19:46:00 +00:00
|
|
|
local majorver=${RELEASE::1}
|
|
|
|
local minorver=${RELEASE:2:1}
|
2021-12-03 13:42:04 +00:00
|
|
|
|
2021-11-16 18:13:22 +00:00
|
|
|
local baseurl="https://yum.oracle.com/ISOS/OracleLinux/OL${majorver}/u${minorver}/${arch}/"
|
2021-11-16 22:57:02 +00:00
|
|
|
local hashurl="https://linux.oracle.com/security/gpg/checksum/OracleLinux-R${majorver}-U${minorver}-Server-x86_64.checksum"
|
2021-11-16 19:27:58 +00:00
|
|
|
|
2021-11-17 03:42:53 +00:00
|
|
|
if [ "${majorver}" == "8" ]; then
|
|
|
|
ISO="OracleLinux-R${majorver}-U${minorver}-${arch}-dvd.iso"
|
|
|
|
else
|
|
|
|
ISO="OracleLinux-R${majorver}-U${minorver}-Server-${arch}-dvd.iso"
|
|
|
|
fi
|
|
|
|
|
2021-11-16 19:58:34 +00:00
|
|
|
URL="${baseurl}/${ISO}"
|
2021-11-16 23:06:09 +00:00
|
|
|
HASH=$(wget -q -O- "${hashurl}" | grep "${ISO}" | cut -d' ' -f1)
|
2021-11-16 18:13:22 +00:00
|
|
|
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
2021-11-16 22:57:02 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
2021-11-16 18:13:22 +00:00
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
function get_macos() {
|
2021-10-27 14:44:53 +00:00
|
|
|
local BOARD_ID=""
|
2021-09-27 23:09:46 +00:00
|
|
|
local CWD=""
|
|
|
|
local MACRECOVERY=""
|
2021-10-27 14:44:53 +00:00
|
|
|
local MLB=""
|
2021-09-27 23:09:46 +00:00
|
|
|
|
|
|
|
case ${RELEASE} in
|
|
|
|
high-sierra)
|
|
|
|
BOARD_ID="Mac-7BA5B2D9E42DDD94"
|
|
|
|
MLB="00000000000J80300";;
|
2021-09-28 14:26:10 +00:00
|
|
|
mojave)
|
2021-09-27 23:09:46 +00:00
|
|
|
BOARD_ID="Mac-7BA5B2DFE22DDD8C"
|
|
|
|
MLB="00000000000KXPG00";;
|
|
|
|
catalina)
|
|
|
|
BOARD_ID="Mac-CFF7D910A743CAAF"
|
|
|
|
MLB="00000000000PHCD00";;
|
|
|
|
big-sur)
|
2021-10-27 14:44:29 +00:00
|
|
|
BOARD_ID="Mac-35C1E88140C3E6CF"
|
2021-09-27 23:09:46 +00:00
|
|
|
MLB="00000000000000000";;
|
2021-10-27 10:56:56 +00:00
|
|
|
monterey)
|
|
|
|
BOARD_ID="Mac-06F11F11946D27C5"
|
|
|
|
MLB="00000000000000000";;
|
2021-09-27 23:09:46 +00:00
|
|
|
*) echo "ERROR! Unknown release: ${RELEASE}"
|
|
|
|
releases_macos
|
|
|
|
exit 1;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Use a bundled macrecovery if possible
|
2021-10-27 11:18:10 +00:00
|
|
|
CWD="$(dirname "${0}")"
|
2021-10-05 16:11:49 +00:00
|
|
|
if [ -x "${CWD}/macrecovery" ]; then
|
|
|
|
MACRECOVERY="${CWD}/macrecovery"
|
2021-09-27 23:09:46 +00:00
|
|
|
elif [ -x /usr/bin/macrecovery ]; then
|
|
|
|
MACRECOVERY="/usr/bin/macrecovery"
|
|
|
|
else
|
2021-10-27 14:45:33 +00:00
|
|
|
web_get "https://raw.githubusercontent.com/wimpysworld/quickemu/master/macrecovery" "${HOME}/.quickemu"
|
|
|
|
MACRECOVERY="python3 ${HOME}/.quickemu/macrecovery"
|
2021-09-27 23:09:46 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "${MACRECOVERY}" ]; then
|
2021-10-27 14:45:33 +00:00
|
|
|
echo "ERROR! Can not find a usable macrecovery."
|
2021-09-27 23:09:46 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-09-30 17:59:00 +00:00
|
|
|
# Get firmware
|
2021-10-25 10:13:53 +00:00
|
|
|
web_get "https://github.com/kholia/OSX-KVM/raw/master/OpenCore/OpenCore.qcow2" "${VM_PATH}"
|
2021-09-30 17:59:00 +00:00
|
|
|
web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd" "${VM_PATH}"
|
|
|
|
if [ ! -e "${VM_PATH}/OVMF_VARS-1024x768.fd" ]; then
|
|
|
|
web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1024x768.fd" "${VM_PATH}"
|
|
|
|
fi
|
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
if [ ! -e "${VM_PATH}/RecoveryImage.chunklist" ]; then
|
|
|
|
echo "Downloading ${RELEASE}..."
|
|
|
|
${MACRECOVERY} \
|
|
|
|
--board-id "${BOARD_ID}" \
|
|
|
|
--mlb "${MLB}" \
|
|
|
|
--basename RecoveryImage \
|
|
|
|
--outdir "${VM_PATH}" \
|
|
|
|
download
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -e "${VM_PATH}/RecoveryImage.dmg" ] && [ ! -e "${VM_PATH}/RecoveryImage.img" ]; then
|
|
|
|
echo "Converting RecoveryImage..."
|
|
|
|
qemu-img convert "${VM_PATH}/RecoveryImage.dmg" -O raw "${VM_PATH}/RecoveryImage.img"
|
|
|
|
fi
|
|
|
|
|
|
|
|
make_vm_config RecoveryImage.img
|
|
|
|
}
|
|
|
|
|
2021-10-19 11:04:00 +00:00
|
|
|
function get_popos() {
|
2021-10-19 19:36:05 +00:00
|
|
|
local DRIVER="intel"
|
|
|
|
local HASH=""
|
2021-10-19 13:49:47 +00:00
|
|
|
local ISO=""
|
2021-10-19 11:04:00 +00:00
|
|
|
local URL=""
|
|
|
|
|
2021-10-19 19:36:05 +00:00
|
|
|
if [ -n "${1}" ]; then
|
|
|
|
DRIVER="${1}"
|
|
|
|
fi
|
|
|
|
|
2021-10-19 15:38:19 +00:00
|
|
|
validate_release "releases_popos"
|
2021-10-19 19:36:05 +00:00
|
|
|
|
|
|
|
URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${DRIVER}" | 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="${HASH//\"/}"
|
2021-10-19 13:49:47 +00:00
|
|
|
web_get "${URL}" "${VM_PATH}"
|
2021-10-19 19:36:05 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
2021-10-19 13:49:47 +00:00
|
|
|
make_vm_config "${ISO}"
|
2021-10-19 11:04:00 +00:00
|
|
|
}
|
|
|
|
|
2021-11-08 00:10:02 +00:00
|
|
|
|
|
|
|
function get_regolith() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local GHDL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download/"
|
|
|
|
|
|
|
|
validate_release "releases_regolith"
|
|
|
|
|
|
|
|
URL="${GHDL}"
|
|
|
|
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";;
|
|
|
|
esac
|
2021-11-17 16:59:47 +00:00
|
|
|
ISO="Regolith_${RELEASE}.iso"
|
2021-11-08 00:10:02 +00:00
|
|
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
2021-11-17 16:59:47 +00:00
|
|
|
if [ -n "${HASH}" ]; then
|
2021-11-08 00:10:02 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
fi
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2022-01-05 16:50:09 +00:00
|
|
|
function get_tails() {
|
|
|
|
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')
|
|
|
|
HASH=$(echo "$RELEASE_JSON" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256')
|
|
|
|
ISO=$(echo "${URL}" | sed -e "s/.*\/\([^\/]*\)$/\1/")
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
2021-11-08 00:10:02 +00:00
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
function get_ubuntu() {
|
|
|
|
local DEVEL="daily-live"
|
|
|
|
local ISO=""
|
2021-10-19 16:20:05 +00:00
|
|
|
local HASH=""
|
2021-09-27 23:09:46 +00:00
|
|
|
local PROJECT=""
|
|
|
|
local URL=""
|
|
|
|
|
|
|
|
case ${OS} in
|
|
|
|
kubuntu|lubuntu|ubuntu|ubuntu-budgie|ubuntu-mate|xubuntu)
|
|
|
|
PROJECT="${OS}";;
|
|
|
|
ubuntu-kylin)
|
|
|
|
PROJECT="ubuntukylin";;
|
|
|
|
ubuntu-studio)
|
|
|
|
PROJECT="ubuntustudio"
|
|
|
|
DEVEL="dvd";;
|
2021-10-19 15:38:19 +00:00
|
|
|
*) echo "ERROR! ${OS} is not a recognised Ubuntu flavour."
|
|
|
|
exit 1;;
|
2021-09-27 23:09:46 +00:00
|
|
|
esac
|
|
|
|
|
2021-10-27 15:25:53 +00:00
|
|
|
if [ "${RELEASE}" == "canary" ] && [ "${OS}" != "ubuntu" ]; then
|
|
|
|
echo "ERROR! Canary is currently only available for Ubuntu."
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
validate_release "releases_ubuntu"
|
|
|
|
fi
|
2021-10-21 17:46:02 +00:00
|
|
|
|
|
|
|
if [ "${RELEASE}" == "canary" ]; then
|
|
|
|
DEVEL="daily-canary"
|
2021-10-27 15:25:53 +00:00
|
|
|
URL="http://cdimage.ubuntu.com/${PROJECT}/${DEVEL}/current"
|
|
|
|
elif [ "${RELEASE}" == "devel" ]; then
|
2021-09-27 23:09:46 +00:00
|
|
|
URL="http://cdimage.ubuntu.com/${PROJECT}/${DEVEL}/current"
|
|
|
|
elif [ "${PROJECT}" == "ubuntu" ]; then
|
|
|
|
URL="http://releases.ubuntu.com/${RELEASE}"
|
|
|
|
else
|
|
|
|
URL="http://cdimage.ubuntu.com/${PROJECT}/releases/${RELEASE}/release"
|
|
|
|
fi
|
|
|
|
|
2021-10-25 10:55:25 +00:00
|
|
|
HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1)
|
|
|
|
ISO=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd' | grep amd64 | cut -d' ' -f2 | sed 's|*||g')
|
2021-10-27 15:25:53 +00:00
|
|
|
if [ "${RELEASE}" == "canary" ] || [ "${RELEASE}" == "devel" ]; then
|
2021-09-28 01:13:08 +00:00
|
|
|
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-${RELEASE}.iso"
|
|
|
|
make_vm_config "${OS}-${RELEASE}.iso"
|
2021-09-27 23:09:46 +00:00
|
|
|
else
|
|
|
|
web_get "${URL}/${ISO}" "${VM_PATH}"
|
2021-10-19 19:34:03 +00:00
|
|
|
check_hash "${ISO}" "${HASH}"
|
2021-09-28 01:13:08 +00:00
|
|
|
make_vm_config "${ISO}"
|
2021-09-27 23:09:46 +00:00
|
|
|
fi
|
|
|
|
}
|
2022-01-16 03:38:45 +00:00
|
|
|
|
2021-11-08 00:32:57 +00:00
|
|
|
function get_garuda() {
|
|
|
|
local HASH=""
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local REL_TYPE=""
|
|
|
|
local LATEST_URL=""
|
|
|
|
local HASH_URL=""
|
|
|
|
local GLDL="http://mirrors.fossho.st/garuda/iso"
|
|
|
|
|
|
|
|
validate_release "releases_garuda"
|
|
|
|
|
|
|
|
# Part of the path is different for a couple of community releases vs the supported garuda ones
|
|
|
|
case ${RELEASE} in
|
|
|
|
mate|cinnamon)
|
|
|
|
REL_TYPE="community";;
|
|
|
|
*)
|
|
|
|
REL_TYPE="garuda";;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# need to follow daily releases and use contents of SHA sums file
|
|
|
|
# to derive the filename and date
|
|
|
|
LATEST_URL="${GLDL}/latest/${REL_TYPE}/${RELEASE}/latest.iso.sha256"
|
|
|
|
HASH_URL="$(wget -q -O- ${LATEST_URL})"
|
|
|
|
ISO="$(echo ${HASH_URL} | awk '{print $NF}' )"
|
2021-11-17 16:59:47 +00:00
|
|
|
HASH=$(echo "${HASH_URL}" | cut -d\ -f1)
|
2021-11-08 00:51:02 +00:00
|
|
|
LDATE=$(echo "${ISO}" | awk -F'-' '{print $NF}' |cut -d'.' -f1) #
|
2021-11-08 00:32:57 +00:00
|
|
|
URL="${GLDL}/${REL_TYPE}/${RELEASE}/${LDATE}"
|
|
|
|
|
|
|
|
#web_get "${URL}/${ISO}" "${VM_PATH}"
|
|
|
|
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-${RELEASE}.iso"
|
|
|
|
#if [ -n "${HASH}" ]; then
|
|
|
|
# check_hash "${ISO}" "${HASH}"
|
|
|
|
#fi
|
|
|
|
make_vm_config "${OS}-${RELEASE}.iso"
|
|
|
|
}
|
2021-09-27 23:09:46 +00:00
|
|
|
|
2021-12-26 15:05:38 +00:00
|
|
|
function get_haiku() {
|
|
|
|
local ISO=""
|
|
|
|
local URL=""
|
|
|
|
local HASH=""
|
|
|
|
|
|
|
|
validate_release "releases_haiku"
|
|
|
|
|
|
|
|
ISO="haiku-${RELEASE}-anyboot.iso"
|
|
|
|
URL="https://cdn.haiku-os.org/haiku-release/$(echo $RELEASE | awk -F '-' '{print $1}')/${ISO}"
|
|
|
|
HASH=$(wget -q -O- ${URL}.sha256 | grep "${ISO}" | cut -d' ' -f4)
|
|
|
|
web_get "${URL}" "${VM_PATH}"
|
|
|
|
check_hash "${ISO}" "${HASH}"
|
|
|
|
make_vm_config "${ISO}"
|
|
|
|
}
|
|
|
|
|
2021-12-06 15:20:48 +00:00
|
|
|
function unattended_windows() {
|
|
|
|
cat << 'EOF' > "${1}"
|
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<unattend xmlns="urn:schemas-microsoft-com:unattend"
|
|
|
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
<!--
|
|
|
|
For documentation on components:
|
2021-12-06 17:23:12 +00:00
|
|
|
https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/
|
2021-12-06 15:20:48 +00:00
|
|
|
-->
|
2021-12-06 17:26:54 +00:00
|
|
|
<settings pass="offlineServicing">
|
|
|
|
<component name="Microsoft-Windows-Shell-Setup"
|
|
|
|
processorArchitecture="amd64"
|
|
|
|
publicKeyToken="31bf3856ad364e35"
|
|
|
|
language="neutral"
|
|
|
|
versionScope="nonSxS"
|
|
|
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
<ComputerName>*</ComputerName>
|
|
|
|
</component>
|
|
|
|
</settings>
|
2021-12-06 15:20:48 +00:00
|
|
|
|
|
|
|
<settings pass="generalize">
|
|
|
|
<component name="Microsoft-Windows-PnPSysprep"
|
|
|
|
processorArchitecture="amd64"
|
|
|
|
publicKeyToken="31bf3856ad364e35"
|
|
|
|
language="neutral"
|
|
|
|
versionScope="nonSxS">
|
|
|
|
<PersistAllDeviceInstalls>true</PersistAllDeviceInstalls>
|
|
|
|
</component>
|
|
|
|
</settings>
|
|
|
|
|
|
|
|
<settings pass="specialize">
|
|
|
|
<component name="Microsoft-Windows-Security-SPP-UX"
|
|
|
|
processorArchitecture="amd64"
|
|
|
|
publicKeyToken="31bf3856ad364e35"
|
|
|
|
language="neutral"
|
|
|
|
versionScope="nonSxS"
|
|
|
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
<SkipAutoActivation>false</SkipAutoActivation>
|
|
|
|
</component>
|
2021-12-06 17:23:40 +00:00
|
|
|
<component name="Microsoft-Windows-Shell-Setup"
|
2021-12-06 17:25:54 +00:00
|
|
|
processorArchitecture="amd64"
|
|
|
|
publicKeyToken="31bf3856ad364e35"
|
|
|
|
language="neutral"
|
|
|
|
versionScope="nonSxS"
|
|
|
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
<ComputerName>*</ComputerName>
|
|
|
|
<OEMInformation>
|
|
|
|
<Manufacturer>Quickemu Project</Manufacturer>
|
|
|
|
<Model>Quickemu</Model>
|
|
|
|
<SupportHours>24/7</SupportHours>
|
|
|
|
<SupportPhone></SupportPhone>
|
|
|
|
<SupportProvider>Quickemu Project</SupportProvider>
|
|
|
|
<SupportURL>https://github.com/quickemu-project/quickemu/issues</SupportURL>
|
|
|
|
</OEMInformation>
|
|
|
|
<OEMName>Quickemu Project</OEMName>
|
|
|
|
</component>
|
2021-12-06 15:20:48 +00:00
|
|
|
<component name="Microsoft-Windows-SQMApi"
|
|
|
|
processorArchitecture="amd64"
|
|
|
|
publicKeyToken="31bf3856ad364e35"
|
|
|
|
language="neutral"
|
|
|
|
versionScope="nonSxS"
|
|
|
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
<CEIPEnabled>0</CEIPEnabled>
|
|
|
|
</component>
|
|
|
|
</settings>
|
|
|
|
|
|
|
|
<settings pass="windowsPE">
|
|
|
|
<component name="Microsoft-Windows-Setup"
|
|
|
|
processorArchitecture="amd64"
|
|
|
|
publicKeyToken="31bf3856ad364e35"
|
|
|
|
language="neutral"
|
|
|
|
versionScope="nonSxS"
|
|
|
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
2021-12-06 17:33:08 +00:00
|
|
|
<Diagnostics>
|
|
|
|
<OptIn>false</OptIn>
|
|
|
|
</Diagnostics>
|
2021-12-06 15:20:48 +00:00
|
|
|
<DiskConfiguration>
|
|
|
|
<Disk wcm:action="add">
|
|
|
|
<DiskID>0</DiskID>
|
|
|
|
<WillWipeDisk>true</WillWipeDisk>
|
|
|
|
<CreatePartitions>
|
|
|
|
<!-- Windows RE Tools partition -->
|
|
|
|
<CreatePartition wcm:action="add">
|
|
|
|
<Order>1</Order>
|
|
|
|
<Type>Primary</Type>
|
|
|
|
<Size>256</Size>
|
|
|
|
</CreatePartition>
|
|
|
|
<!-- System partition (ESP) -->
|
|
|
|
<CreatePartition wcm:action="add">
|
|
|
|
<Order>2</Order>
|
|
|
|
<Type>EFI</Type>
|
|
|
|
<Size>128</Size>
|
|
|
|
</CreatePartition>
|
|
|
|
<!-- Microsoft reserved partition (MSR) -->
|
|
|
|
<CreatePartition wcm:action="add">
|
|
|
|
<Order>3</Order>
|
|
|
|
<Type>MSR</Type>
|
|
|
|
<Size>128</Size>
|
|
|
|
</CreatePartition>
|
|
|
|
<!-- Windows partition -->
|
|
|
|
<CreatePartition wcm:action="add">
|
|
|
|
<Order>4</Order>
|
|
|
|
<Type>Primary</Type>
|
|
|
|
<Extend>true</Extend>
|
|
|
|
</CreatePartition>
|
|
|
|
</CreatePartitions>
|
|
|
|
<ModifyPartitions>
|
|
|
|
<!-- Windows RE Tools partition -->
|
|
|
|
<ModifyPartition wcm:action="add">
|
|
|
|
<Order>1</Order>
|
|
|
|
<PartitionID>1</PartitionID>
|
|
|
|
<Label>WINRE</Label>
|
|
|
|
<Format>NTFS</Format>
|
|
|
|
<TypeID>DE94BBA4-06D1-4D40-A16A-BFD50179D6AC</TypeID>
|
|
|
|
</ModifyPartition>
|
|
|
|
<!-- System partition (ESP) -->
|
|
|
|
<ModifyPartition wcm:action="add">
|
|
|
|
<Order>2</Order>
|
|
|
|
<PartitionID>2</PartitionID>
|
|
|
|
<Label>System</Label>
|
|
|
|
<Format>FAT32</Format>
|
|
|
|
</ModifyPartition>
|
|
|
|
<!-- MSR partition does not need to be modified -->
|
|
|
|
<ModifyPartition wcm:action="add">
|
|
|
|
<Order>3</Order>
|
|
|
|
<PartitionID>3</PartitionID>
|
|
|
|
</ModifyPartition>
|
|
|
|
<!-- Windows partition -->
|
|
|
|
<ModifyPartition wcm:action="add">
|
|
|
|
<Order>4</Order>
|
|
|
|
<PartitionID>4</PartitionID>
|
|
|
|
<Label>Windows</Label>
|
|
|
|
<Letter>C</Letter>
|
|
|
|
<Format>NTFS</Format>
|
|
|
|
</ModifyPartition>
|
|
|
|
</ModifyPartitions>
|
|
|
|
</Disk>
|
|
|
|
</DiskConfiguration>
|
2021-12-06 17:33:08 +00:00
|
|
|
<DynamicUpdate>
|
|
|
|
<Enable>true</Enable>
|
|
|
|
<WillShowUI>Never</WillShowUI>
|
|
|
|
</DynamicUpdate>
|
2021-12-06 15:20:48 +00:00
|
|
|
<ImageInstall>
|
|
|
|
<OSImage>
|
|
|
|
<InstallTo>
|
|
|
|
<DiskID>0</DiskID>
|
|
|
|
<PartitionID>4</PartitionID>
|
|
|
|
</InstallTo>
|
|
|
|
<InstallToAvailablePartition>false</InstallToAvailablePartition>
|
|
|
|
</OSImage>
|
|
|
|
</ImageInstall>
|
2021-12-07 10:11:03 +00:00
|
|
|
<RunSynchronous>
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
<Order>1</Order>
|
|
|
|
<Path>reg add HKLM\System\Setup\LabConfig /v BypassCPUCheck /t REG_DWORD /d 0x00000001 /f</Path>
|
|
|
|
</RunSynchronousCommand>
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
<Order>2</Order>
|
|
|
|
<Path>reg add HKLM\System\Setup\LabConfig /v BypassRAMCheck /t REG_DWORD /d 0x00000001 /f</Path>
|
|
|
|
</RunSynchronousCommand>
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
<Order>3</Order>
|
|
|
|
<Path>reg add HKLM\System\Setup\LabConfig /v BypassSecureBootCheck /t REG_DWORD /d 0x00000001 /f</Path>
|
|
|
|
</RunSynchronousCommand>
|
|
|
|
<RunSynchronousCommand wcm:action="add">
|
|
|
|
<Order>4</Order>
|
|
|
|
<Path>reg add HKLM\System\Setup\LabConfig /v BypassTPMCheck /t REG_DWORD /d 0x00000001 /f</Path>
|
|
|
|
</RunSynchronousCommand>
|
|
|
|
</RunSynchronous>
|
2021-12-06 17:27:50 +00:00
|
|
|
<UpgradeData>
|
|
|
|
<Upgrade>false</Upgrade>
|
|
|
|
<WillShowUI>Never</WillShowUI>
|
|
|
|
</UpgradeData>
|
2021-12-06 15:20:48 +00:00
|
|
|
<UserData>
|
|
|
|
<AcceptEula>true</AcceptEula>
|
|
|
|
<ProductKey>
|
|
|
|
<key>VK7JG-NPHTM-C97JM-9MPGT-3V66T</key>
|
|
|
|
<WillShowUI>Never</WillShowUI>
|
|
|
|
</ProductKey>
|
|
|
|
</UserData>
|
|
|
|
</component>
|
|
|
|
|
|
|
|
<component name="Microsoft-Windows-PnpCustomizationsWinPE"
|
|
|
|
publicKeyToken="31bf3856ad364e35"
|
|
|
|
language="neutral"
|
|
|
|
versionScope="nonSxS"
|
|
|
|
processorArchitecture="amd64">
|
|
|
|
|
|
|
|
<!--
|
|
|
|
This makes the VirtIO drivers available to Windows, assuming that
|
|
|
|
the VirtIO driver disk
|
|
|
|
(https://github.com/virtio-win/virtio-win-pkg-scripts/blob/master/README.md)
|
|
|
|
is available as drive E:
|
|
|
|
-->
|
|
|
|
<DriverPaths>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="1">
|
|
|
|
<Path>E:\qemufwcfg\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="2">
|
|
|
|
<Path>E:\vioinput\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="3">
|
|
|
|
<Path>E:\vioscsi\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="4">
|
|
|
|
<Path>E:\viostor\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="5">
|
|
|
|
<Path>E:\vioserial\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="6">
|
|
|
|
<Path>E:\qxldod\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="7">
|
|
|
|
<Path>E:\amd64\w10</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="8">
|
|
|
|
<Path>E:\viogpudo\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="9">
|
|
|
|
<Path>E:\viorng\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="10">
|
|
|
|
<Path>E:\NetKVM\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="11">
|
|
|
|
<Path>E:\viofs\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
<PathAndCredentials wcm:action="add" wcm:keyValue="12">
|
|
|
|
<Path>E:\Balloon\w10\amd64</Path>
|
|
|
|
</PathAndCredentials>
|
|
|
|
</DriverPaths>
|
|
|
|
</component>
|
|
|
|
</settings>
|
|
|
|
|
|
|
|
<settings pass="oobeSystem">
|
|
|
|
<component name="Microsoft-Windows-Shell-Setup"
|
|
|
|
processorArchitecture="amd64"
|
|
|
|
publicKeyToken="31bf3856ad364e35"
|
|
|
|
language="neutral"
|
|
|
|
versionScope="nonSxS"
|
|
|
|
xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
|
|
<OOBE>
|
|
|
|
<HideEULAPage>true</HideEULAPage>
|
|
|
|
<HideLocalAccountScreen>false</HideLocalAccountScreen>
|
|
|
|
<HideOEMRegistrationScreen>true</HideOEMRegistrationScreen>
|
|
|
|
<HideOnlineAccountScreens>false</HideOnlineAccountScreens>
|
|
|
|
<HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
|
|
|
|
<ProtectYourPC>3</ProtectYourPC>
|
|
|
|
<SkipUserOOBE>false</SkipUserOOBE>
|
|
|
|
<SkipMachineOOBE>false</SkipMachineOOBE>
|
|
|
|
<VMModeOptimizations>
|
|
|
|
<SkipWinREInitialization>true</SkipWinREInitialization>
|
|
|
|
</VMModeOptimizations>
|
|
|
|
</OOBE>
|
|
|
|
<FirstLogonCommands>
|
|
|
|
<SynchronousCommand wcm:action="add">
|
|
|
|
<CommandLine>msiexec /i E:\guest-agent\qemu-ga-x86_64.msi /quiet /passive /qn</CommandLine>
|
|
|
|
<Description>Install Virtio Guest Agent</Description>
|
|
|
|
<Order>1</Order>
|
|
|
|
</SynchronousCommand>
|
|
|
|
<SynchronousCommand wcm:action="add">
|
|
|
|
<CommandLine>msiexec /i F:\spice-webdavd-x64-latest.msi /quiet /passive /qn</CommandLine>
|
|
|
|
<Description>Install spice-webdavd file sharing agent</Description>
|
|
|
|
<Order>2</Order>
|
|
|
|
</SynchronousCommand>
|
|
|
|
<SynchronousCommand wcm:action="add">
|
|
|
|
<CommandLine>msiexec /i F:\UsbDk_1.0.22_x64.msi /quiet /passive /qn</CommandLine>
|
|
|
|
<Description>Install usbdk USB sharing agent</Description>
|
|
|
|
<Order>3</Order>
|
|
|
|
</SynchronousCommand>
|
|
|
|
<SynchronousCommand wcm:action="add">
|
|
|
|
<CommandLine>msiexec /i F:\spice-vdagent-x64-0.10.0.msi /quiet /passive /qn</CommandLine>
|
|
|
|
<Description>Install spice-vdagent SPICE agent</Description>
|
|
|
|
<Order>4</Order>
|
|
|
|
</SynchronousCommand>
|
|
|
|
<SynchronousCommand wcm:action="add">
|
|
|
|
<CommandLine>Cmd /c POWERCFG -H OFF</CommandLine>
|
|
|
|
<Description>Disable Hibernation</Description>
|
|
|
|
<Order>5</Order>
|
|
|
|
</SynchronousCommand>
|
|
|
|
</FirstLogonCommands>
|
|
|
|
</component>
|
|
|
|
</settings>
|
|
|
|
</unattend>
|
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
2021-12-06 10:55:54 +00:00
|
|
|
function dbg_windows() {
|
|
|
|
local DEBUG=0
|
|
|
|
if [ ${DEBUG} -eq 1 ]; then
|
|
|
|
echo "${1}"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2021-09-28 04:03:16 +00:00
|
|
|
# Adapted from https://gist.github.com/hongkongkiwi/15a5bf16437315df256c118c163607cb
|
|
|
|
function get_windows() {
|
|
|
|
local ARCH="x64"
|
2021-10-29 08:50:23 +00:00
|
|
|
local INDEX=0
|
2021-09-28 04:03:16 +00:00
|
|
|
local LANG_CODE="en"
|
|
|
|
local LATEST_WINDOWS_VERSION=""
|
|
|
|
local WINDOWS_NAME=""
|
|
|
|
local VERSION_ID=""
|
|
|
|
local EDITION_ID=""
|
|
|
|
local LANGUAGE_ID=""
|
|
|
|
local FILE_NAME=""
|
|
|
|
local ARCH_ID=""
|
|
|
|
local DOWNLOAD_INFO=""
|
|
|
|
local DOWNLOAD_ID=""
|
|
|
|
local DOWNLOAD_URL=""
|
2021-10-19 14:14:03 +00:00
|
|
|
|
2021-10-19 15:38:19 +00:00
|
|
|
validate_release "releases_windows"
|
2021-09-28 04:03:16 +00:00
|
|
|
|
2021-10-29 08:50:23 +00:00
|
|
|
# Ignore the most recent Windows 10 release for now.
|
2021-11-17 16:59:47 +00:00
|
|
|
if [ "${RELEASE}" -eq 10 ]; then
|
2021-12-06 10:54:46 +00:00
|
|
|
INDEX=0
|
2021-10-29 08:50:23 +00:00
|
|
|
fi
|
|
|
|
|
2021-11-17 17:02:20 +00:00
|
|
|
if [ "${RELEASE}" -eq 11 ]; then
|
2021-12-06 10:54:46 +00:00
|
|
|
INDEX=0
|
2021-11-17 17:02:20 +00:00
|
|
|
fi
|
|
|
|
|
2021-09-28 04:03:16 +00:00
|
|
|
echo "Getting Windows ${RELEASE} URL..."
|
2021-10-05 19:08:13 +00:00
|
|
|
WINDOWS_VERSIONS=$(wget -q -O- "https://tb.rg-adguard.net/php/get_version.php?type_id=1" | jq '.versions | sort_by(-(.version_id | tonumber))')
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${WINDOWS_VERSIONS}"
|
2021-10-29 08:50:23 +00:00
|
|
|
LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows '${RELEASE}'")))['${INDEX}']')
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${LATEST_WINDOWS_VERSION}"
|
2021-10-05 19:08:13 +00:00
|
|
|
|
2021-09-28 04:03:16 +00:00
|
|
|
WINDOWS_NAME=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .name)
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${WINDOWS_NAME}"
|
2021-09-28 04:03:16 +00:00
|
|
|
VERSION_ID=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .version_id)
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${VERSION_ID}"
|
2021-10-05 19:08:13 +00:00
|
|
|
|
|
|
|
case ${RELEASE} in
|
2021-10-05 22:49:03 +00:00
|
|
|
8) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 8.1 Pro + Core").edition_id');;
|
|
|
|
10|11) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows '${RELEASE}'").edition_id');;
|
2021-10-05 19:08:13 +00:00
|
|
|
esac
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${EDITION_ID}"
|
2021-10-05 19:08:13 +00:00
|
|
|
|
2021-09-28 04:03:16 +00:00
|
|
|
LANGUAGE_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_language.php?edition_id=${EDITION_ID}&lang=name_${LANG_CODE}" | jq -r '.languages[] | select(.name_'${LANG_CODE}'=="'"${LANG_NAME}"'").language_id')
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${LANGUAGE_ID}"
|
2021-09-28 04:03:16 +00:00
|
|
|
ARCH_INFO=$(wget -q -O- "https://tb.rg-adguard.net/php/get_arch.php?language_id=${LANGUAGE_ID}")
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${ARCH_INFO}"
|
2021-09-28 04:03:16 +00:00
|
|
|
FILE_NAME=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).name')
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${FILE_NAME}"
|
2021-09-28 04:03:16 +00:00
|
|
|
ARCH_ID=$(echo "${ARCH_INFO}" | jq -r '.archs[] | select(.name | contains("'${ARCH}'")).arch_id')
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${ARCH_ID}"
|
2021-09-28 04:03:16 +00:00
|
|
|
DOWNLOAD_INFO=$(wget -q -O- "https://tb.rg-adguard.net/dl.php?fileName=${ARCH_ID}&lang=en")
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${DOWNLOAD_INFO}"
|
2021-10-09 15:26:45 +00:00
|
|
|
DOWNLOAD_SHA1=$(echo "${DOWNLOAD_INFO}" | sed -e 's/<[^>]*>//g' | grep -o -P '(?<=SHA1: ).*(?= expire)' | sed 's/Link//')
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${DOWNLOAD_SHA1}"
|
2021-09-28 04:03:16 +00:00
|
|
|
DOWNLOAD_ID=$(echo "${DOWNLOAD_INFO}" | grep -oP '(?<=https:\/\/tb\.rg-adguard\.net/dl\.php\?go=)[0-9a-z]+')
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${DOWNLOAD_ID}"
|
2021-09-28 04:03:16 +00:00
|
|
|
DOWNLOAD_URL="https://tb.rg-adguard.net/dl.php?go=${DOWNLOAD_ID}"
|
2021-12-06 10:55:54 +00:00
|
|
|
dbg_windows "${DOWNLOAD_URL}"
|
2021-09-28 04:03:16 +00:00
|
|
|
|
|
|
|
echo "Downloading ${WINDOWS_NAME}..."
|
|
|
|
web_get "${DOWNLOAD_URL}" "${VM_PATH}" "${FILE_NAME}"
|
2021-10-09 15:10:58 +00:00
|
|
|
|
2021-10-19 16:20:05 +00:00
|
|
|
# Windows 10 doesn't include a SHA1, so only check the integrity if the SHA1 is available.
|
2021-10-09 15:32:40 +00:00
|
|
|
if [ -n "${DOWNLOAD_SHA1}" ]; then
|
2021-10-19 19:34:03 +00:00
|
|
|
check_hash "${FILE_NAME}" "${DOWNLOAD_SHA1}"
|
2021-10-09 15:10:58 +00:00
|
|
|
fi
|
2021-09-28 04:03:16 +00:00
|
|
|
|
|
|
|
web_get "https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/stable-virtio/virtio-win.iso" "${VM_PATH}"
|
|
|
|
|
2021-10-19 15:39:21 +00:00
|
|
|
rm -f "${VM_PATH}/unattended.iso"
|
|
|
|
case ${RELEASE} in
|
|
|
|
10|11)
|
|
|
|
echo "Making unattended.iso"
|
|
|
|
mkdir -p "${VM_PATH}/unattended" 2>/dev/null
|
|
|
|
web_get https://www.spice-space.org/download/windows/spice-webdavd/spice-webdavd-x64-latest.msi "${VM_PATH}/unattended"
|
|
|
|
web_get https://www.spice-space.org/download/windows/vdagent/vdagent-win-0.10.0/spice-vdagent-x64-0.10.0.msi "${VM_PATH}/unattended"
|
|
|
|
web_get https://www.spice-space.org/download/windows/usbdk/UsbDk_1.0.22_x64.msi "${VM_PATH}/unattended"
|
|
|
|
unattended_windows "${VM_PATH}/unattended/autounattend.xml"
|
|
|
|
mkisofs -quiet -l -o "${VM_PATH}/unattended.iso" "${VM_PATH}/unattended/"
|
|
|
|
;;
|
|
|
|
esac
|
2021-09-28 04:03:16 +00:00
|
|
|
make_vm_config "${FILE_NAME}" "virtio-win.iso"
|
|
|
|
}
|
|
|
|
|
2021-10-28 21:41:35 +00:00
|
|
|
trap cleanup EXIT
|
|
|
|
|
|
|
|
if ((BASH_VERSINFO[0] < 4))
|
|
|
|
then
|
|
|
|
echo "Sorry, you need bash 4.0 or newer to run this script."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2021-10-19 10:41:57 +00:00
|
|
|
LANGS=()
|
|
|
|
languages_windows
|
|
|
|
|
2021-09-27 23:09:46 +00:00
|
|
|
if [ -n "${1}" ]; then
|
|
|
|
OS="${1,,}"
|
2021-10-19 23:35:00 +00:00
|
|
|
if [ "${OS}" == "list" ] || [ "${OS}" == "list_csv" ]; then
|
|
|
|
list_csv
|
2021-10-19 23:37:46 +00:00
|
|
|
elif [ "${OS}" == "list_json" ]; then
|
|
|
|
list_json
|
2021-11-07 23:28:56 +00:00
|
|
|
elif [ "${OS}" == "--version" ] || [ "${OS}" == "-version" ] || [ "${OS}" == "version" ]; then
|
2021-11-08 00:03:50 +00:00
|
|
|
whereIam=$(dirname "${BASH_SOURCE[0]}")
|
2021-11-17 16:59:47 +00:00
|
|
|
quickemu_version=$( "${whereIam}"/quickemu --version)
|
2021-11-07 23:28:56 +00:00
|
|
|
echo "Quickemu Version: ${quickemu_version}"
|
2021-11-08 00:03:50 +00:00
|
|
|
exit 0
|
2021-10-19 10:41:57 +00:00
|
|
|
fi
|
2021-09-27 23:09:46 +00:00
|
|
|
else
|
2021-10-19 13:56:45 +00:00
|
|
|
echo "ERROR! You must specify an operating system:"
|
2021-09-27 23:09:46 +00:00
|
|
|
os_support
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -n "${2}" ]; then
|
|
|
|
RELEASE="${2,,}"
|
2021-10-19 13:56:45 +00:00
|
|
|
VM_PATH="${OS}-${RELEASE}"
|
|
|
|
|
2021-12-03 13:42:04 +00:00
|
|
|
if [ "${OS}" == "alma" ]; then
|
|
|
|
if [ -n "${3}" ]; then
|
|
|
|
ISOTYPE="${3,,}"
|
|
|
|
ISOTYPES=(minimal dvd ) # boot) # a step too far
|
|
|
|
if [[ ! ${ISOTYPES[*]} =~ ${ISOTYPE} ]]; then
|
|
|
|
echo "iso ${ISOTYPE} is not supported:"
|
|
|
|
for ISOTYPE in "${ISOTYPES[@]}"; do
|
|
|
|
echo "${ISOTYPE}"
|
|
|
|
done
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
ISOTYPE="minimal"
|
|
|
|
fi
|
|
|
|
VM_PATH="${OS}-${RELEASE}-${ISOTYPE}"
|
|
|
|
get_alma "${ISOTYPE}"
|
2021-12-30 10:23:04 +00:00
|
|
|
elif [ "${OS}" == "alpine" ]; then
|
|
|
|
get_alpine
|
2021-12-03 13:42:04 +00:00
|
|
|
elif [ "${OS}" == "android" ]; then
|
2021-10-29 13:50:45 +00:00
|
|
|
get_android
|
|
|
|
elif [ "${OS}" == "archlinux" ]; then
|
2021-10-29 09:36:31 +00:00
|
|
|
get_archlinux
|
2021-12-20 10:35:54 +00:00
|
|
|
elif [ "${OS}" == "arcolinux" ]; then
|
|
|
|
get_arcolinux
|
2022-01-16 03:38:45 +00:00
|
|
|
elif [ "${OS}" == "void" ]; then
|
|
|
|
get_void
|
2021-11-19 22:01:27 +00:00
|
|
|
elif [ "${OS}" == "debian" ]; then
|
2021-11-19 23:39:25 +00:00
|
|
|
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"
|
|
|
|
fi
|
|
|
|
VM_PATH="${OS}-${RELEASE}-${FREEDOM}"
|
|
|
|
get_debian "${FREEDOM}"
|
2021-10-29 09:36:31 +00:00
|
|
|
elif [ "${OS}" == "elementary" ]; then
|
2021-10-19 13:56:45 +00:00
|
|
|
get_elementary
|
|
|
|
elif [ "${OS}" == "macos" ]; then
|
|
|
|
get_macos
|
|
|
|
elif [ "${OS}" == "freebsd" ]; then
|
|
|
|
get_freebsd
|
|
|
|
elif [ "${OS}" == "fedora" ]; then
|
|
|
|
get_fedora
|
2021-11-08 00:32:57 +00:00
|
|
|
elif [ "${OS}" == "garuda" ]; then
|
|
|
|
get_garuda
|
2021-11-21 19:54:34 +00:00
|
|
|
elif [ "${OS}" == "cachyos" ]; then
|
|
|
|
get_cachyos
|
2021-11-28 23:06:23 +00:00
|
|
|
elif [ "${OS}" == "gentoo" ]; then
|
|
|
|
get_gentoo
|
2021-12-26 15:05:38 +00:00
|
|
|
elif [ "${OS}" == "haiku" ]; then
|
|
|
|
get_haiku
|
2021-10-25 10:32:22 +00:00
|
|
|
elif [ "${OS}" == "kali" ]; then
|
|
|
|
get_kali
|
2021-11-07 23:39:20 +00:00
|
|
|
elif [ "${OS}" == "kdeneon" ]; then
|
|
|
|
get_kdeneon
|
2021-12-21 21:13:47 +00:00
|
|
|
elif [ "${OS}" == "kolibrios" ]; then
|
|
|
|
get_kolibrios
|
2021-10-25 12:23:43 +00:00
|
|
|
elif [[ "${OS}" == *"linuxmint-"* ]]; then
|
2021-10-19 13:56:45 +00:00
|
|
|
get_linuxmint
|
2021-12-29 12:36:58 +00:00
|
|
|
elif [[ "${OS}" == *"manjaro-"* ]]; then
|
|
|
|
get_manjaro
|
2021-12-27 07:06:28 +00:00
|
|
|
elif [[ "${OS}" == *"mxlinux-"* ]]; then
|
|
|
|
get_mxlinux
|
2021-10-25 12:23:43 +00:00
|
|
|
elif [[ "${OS}" == *"nixos-"* ]]; then
|
2021-10-24 21:20:46 +00:00
|
|
|
get_nixos
|
2021-10-20 22:22:35 +00:00
|
|
|
elif [ "${OS}" == "openbsd" ]; then
|
|
|
|
get_openbsd
|
2021-10-19 13:56:45 +00:00
|
|
|
elif [ "${OS}" == "opensuse" ]; then
|
|
|
|
get_opensuse
|
2021-11-16 18:13:22 +00:00
|
|
|
elif [ "${OS}" == "oraclelinux" ]; then
|
|
|
|
get_oraclelinux
|
2021-12-29 12:36:58 +00:00
|
|
|
elif [ "${OS}" == "popos" ]; then
|
2021-10-19 19:36:05 +00:00
|
|
|
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}"
|
2021-11-08 00:10:02 +00:00
|
|
|
elif [ "${OS}" == "regolith" ]; then
|
|
|
|
get_regolith
|
2021-11-01 18:10:55 +00:00
|
|
|
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}"
|
2021-11-07 23:41:39 +00:00
|
|
|
elif [ "${OS}" == "solus" ]; then
|
|
|
|
get_solus
|
2022-01-05 16:50:09 +00:00
|
|
|
elif [[ "${OS}" == "tails"* ]]; then
|
|
|
|
get_tails
|
2021-10-19 13:56:45 +00:00
|
|
|
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
|
|
|
get_ubuntu
|
|
|
|
elif [ "${OS}" == "windows" ]; then
|
|
|
|
if [ -n "${3}" ]; then
|
|
|
|
LANG_NAME="${3}"
|
|
|
|
if [[ ! ${LANGS[*]} =~ ${LANG_NAME} ]]; then
|
|
|
|
echo "ERROR! ${LANG_NAME} is not a supported language:"
|
|
|
|
for LANG in "${LANGS[@]}"; do
|
|
|
|
echo "${LANG}"
|
|
|
|
done
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
LANG_NAME="English International"
|
|
|
|
fi
|
|
|
|
get_windows "${LANG_NAME}"
|
2021-11-07 23:18:29 +00:00
|
|
|
elif [ "${OS}" == "zorin" ]; then
|
|
|
|
get_zorin
|
2021-10-19 13:56:45 +00:00
|
|
|
else
|
|
|
|
echo "ERROR! ${OS} is unknown:"
|
|
|
|
os_support
|
|
|
|
exit 1
|
|
|
|
fi
|
2021-09-27 23:09:46 +00:00
|
|
|
else
|
2021-10-25 12:23:43 +00:00
|
|
|
echo -n "ERROR! You must specify a release: "
|
2021-12-03 13:42:04 +00:00
|
|
|
if [ "${OS}" == "alma" ]; then
|
|
|
|
releases_alma
|
2021-12-30 10:23:04 +00:00
|
|
|
elif [ "${OS}" == "alpine" ]; then
|
|
|
|
releases_alpine
|
2021-12-03 13:42:04 +00:00
|
|
|
elif [ "${OS}" == "android" ]; then
|
2021-11-13 10:51:16 +00:00
|
|
|
releases_android
|
|
|
|
elif [ "${OS}" == "archlinux" ]; then
|
2021-10-29 09:36:31 +00:00
|
|
|
releases_archlinux
|
2021-12-20 10:35:54 +00:00
|
|
|
elif [ "${OS}" == "arcolinux" ]; then
|
|
|
|
releases_arcolinux
|
2021-11-19 22:01:27 +00:00
|
|
|
elif [ "${OS}" == "debian" ]; then
|
|
|
|
releases_debian
|
2021-10-29 09:36:31 +00:00
|
|
|
elif [ "${OS}" == "elementary" ]; then
|
2021-10-19 11:04:16 +00:00
|
|
|
releases_elementary
|
|
|
|
elif [ "${OS}" == "freebsd" ]; then
|
2021-10-07 15:36:10 +00:00
|
|
|
releases_freebsd
|
2021-10-16 18:09:39 +00:00
|
|
|
elif [ "${OS}" == "fedora" ]; then
|
|
|
|
releases_fedora
|
2021-11-08 00:32:57 +00:00
|
|
|
elif [ "${OS}" == "garuda" ]; then
|
|
|
|
releases_garuda
|
2021-11-21 19:54:34 +00:00
|
|
|
elif [ "${OS}" == "cachyos" ]; then
|
|
|
|
releases_cachyos
|
2021-11-28 23:06:23 +00:00
|
|
|
elif [ "${OS}" == "gentoo" ]; then
|
|
|
|
releases_gentoo
|
2021-12-26 15:05:38 +00:00
|
|
|
elif [ "${OS}" == "haiku" ]; then
|
|
|
|
releases_haiku
|
2021-10-25 10:32:22 +00:00
|
|
|
elif [ "${OS}" == "kali" ]; then
|
|
|
|
releases_kali
|
2021-12-21 21:13:47 +00:00
|
|
|
elif [ "${OS}" == "kolibrios" ]; then
|
|
|
|
releases_kolibrios
|
2021-10-25 12:23:43 +00:00
|
|
|
elif [[ "${OS}" == *"linuxmint-"* ]]; then
|
2021-10-16 19:58:53 +00:00
|
|
|
releases_linuxmint
|
2021-12-29 12:36:58 +00:00
|
|
|
elif [[ "${OS}" == *"manjaro-"* ]]; then
|
|
|
|
releases_manjaro
|
2021-12-27 07:06:28 +00:00
|
|
|
elif [[ "${OS}" == *"mxlinux-"* ]]; then
|
|
|
|
releases_mxlinux
|
2021-10-25 12:23:43 +00:00
|
|
|
elif [[ "${OS}" == *"nixos-"* ]]; then
|
2021-10-24 21:20:46 +00:00
|
|
|
releases_nixos
|
2021-10-16 18:27:45 +00:00
|
|
|
elif [ "${OS}" == "opensuse" ]; then
|
|
|
|
releases_opensuse
|
2021-11-16 18:13:22 +00:00
|
|
|
elif [ "${OS}" == "oraclelinux" ]; then
|
|
|
|
releases_oraclelinux
|
2021-10-20 21:07:07 +00:00
|
|
|
elif [ "${OS}" == "openbsd" ]; then
|
|
|
|
releases_openbsd
|
2021-10-07 15:36:10 +00:00
|
|
|
elif [ "${OS}" == "macos" ]; then
|
2021-09-27 23:09:46 +00:00
|
|
|
releases_macos
|
2021-10-19 11:04:00 +00:00
|
|
|
elif [ "${OS}" == "popos" ]; then
|
|
|
|
releases_popos
|
2021-11-08 00:10:02 +00:00
|
|
|
elif [ "${OS}" == "regolith" ]; then
|
|
|
|
releases_regolith
|
2021-12-02 19:07:51 +00:00
|
|
|
elif [ "${OS}" == "rockylinux" ]; then
|
|
|
|
releases_rockylinux
|
2021-11-07 23:41:39 +00:00
|
|
|
elif [ "${OS}" == "solus" ]; then
|
|
|
|
releases_solus
|
2022-01-05 16:50:09 +00:00
|
|
|
elif [[ "${OS}" == "tails"* ]]; then
|
|
|
|
releases_tails
|
2021-09-27 23:09:46 +00:00
|
|
|
elif [[ "${OS}" == *"ubuntu"* ]]; then
|
|
|
|
releases_ubuntu
|
2022-01-16 03:38:45 +00:00
|
|
|
elif [ "${OS}" == "void" ]; then
|
|
|
|
releases_void
|
2021-10-05 22:51:57 +00:00
|
|
|
elif [ "${OS}" == "windows" ]; then
|
2021-09-28 04:03:16 +00:00
|
|
|
releases_windows
|
2021-11-07 23:18:29 +00:00
|
|
|
elif [ "${OS}" == "zorin" ]; then
|
2021-11-08 00:03:50 +00:00
|
|
|
releases_zorin
|
2021-10-25 12:23:43 +00:00
|
|
|
else
|
|
|
|
echo "${OS} is unknown"
|
|
|
|
os_support
|
2021-09-27 23:09:46 +00:00
|
|
|
fi
|
|
|
|
exit 1
|
2021-11-08 00:03:50 +00:00
|
|
|
fi
|