From 0fe5232a019480e0e46573f3a9144f2d284c6ee0 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 15:02:54 +0000 Subject: [PATCH 01/61] Refactor Android support and add editions --- quickget | 64 +++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/quickget b/quickget index 7e9a18b..95295fd 100755 --- a/quickget +++ b/quickget @@ -230,12 +230,12 @@ function releases_alpine() { function releases_android() { echo 9.0 \ 8.1 \ - 7.1 \ - 6.0 \ - 5.1 \ - 4.4 \ - 4.0 \ - 2.2 + 7.1 +} + +function editions_android() { + echo x86 \ + x86_64 } function releases_archlinux() { @@ -769,33 +769,6 @@ EOF exit 0 } -function get_android() { - local HASH="" - local ISO="" - local URL="" - - 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"))))') - - HASH=$(echo "${releaseJson}" | jq -r .hash.sha256) - ISO=$(echo "${releaseJson}" | jq -r .n) - - baseurl="https://mirrors.gigenet.com/OSDN/android-x86/" - - releaseFolders=$(wget -q -O - ${baseurl} | grep -o -E '[0-9]{5}' | uniq) - for item in $releaseFolders; do - file=$(wget -O - -q "${baseurl}${item}" | grep "${ISO}") - if [[ $file != "" ]]; then - URL="${baseurl}${item}/${ISO}" - break - fi - done - web_get "${URL}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" -} - function get_alma() { local EDITION="" local HASH="" @@ -835,6 +808,31 @@ function get_alpine() { make_vm_config "${ISO}" } +function get_android() { + local EDITION="${1:-}" + local HASH="" + local ISO="" + local JSON_ALL="" + local JSON_REL="" + local URL="https://mirrors.gigenet.com/OSDN/android-x86" + + JSON_ALL=$(wget -q -O- "https://www.fosshub.com/Android-x86-old.html" | grep "var settings =" | cut -d'=' -f2-) + JSON_REL=$(echo "${JSON_ALL}" | jq --arg ver "${OS}-${EDITION}-${RELEASE}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))') + ISO=$(echo "${JSON_REL}" | jq -r .n) + HASH=$(echo "${JSON_REL}" | jq -r .hash.sha256) + + # Traverse the directories to find the .iso location + for DIR in $(wget -q -O- ${URL} | grep -o -E '[0-9]{5}' | sort -ur); do + if wget -q -O- "${URL}/${DIR}" | grep "${ISO}" &>/dev/null; then + URL="${URL}/${DIR}" + break + fi + done + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_archlinux() { local HASH="" local ISO="" From 8050abc6f05a9c2dc9237314e508fcf7b12e109f Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 15:03:20 +0000 Subject: [PATCH 02/61] Refactor get_elementary() --- quickget | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/quickget b/quickget index 95295fd..0d9307a 100755 --- a/quickget +++ b/quickget @@ -921,12 +921,9 @@ function get_elementary() { local ISO="" local ISOTAG="20211218-rc" local URL="" - local B66tim="" - B66tim=$(date +%s | base64) ISO="elementaryos-${RELEASE}-stable.${ISOTAG}.iso" - # TODO: derive region from geoIP - URL="https://ams3.dl.elementary.io/download/${B66tim}=/${ISO}" + URL="https://ams3.dl.elementary.io/download/$(date +%s | base64)=/${ISO}" web_get "${URL}" "${VM_PATH}" make_vm_config "${ISO}" } From 1dc780b9e27b779f15bce6ee7911a91d55dea479 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 15:15:56 +0000 Subject: [PATCH 03/61] Remove EDITION boiler plate from all get_() functions --- quickget | 103 ++++++++++--------------------------------------------- 1 file changed, 18 insertions(+), 85 deletions(-) diff --git a/quickget b/quickget index 0d9307a..cbe6b70 100755 --- a/quickget +++ b/quickget @@ -9,15 +9,11 @@ # 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 EDITION="${1:-}" # local HASH="" # local ISO="" # local URL="" # -# 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}" @@ -770,15 +766,11 @@ EOF } function get_alma() { - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local URL="" - if [ -n "${1}" ]; then - EDITION="${1}" - fi - 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)" @@ -849,17 +841,13 @@ function get_archlinux() { } function get_arcolinux() { - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local URL="" - if [ -n "${1}" ]; then - EDITION="${1:0:1}" - fi - URL="https://ant.seedhost.eu/arcolinux/iso/${RELEASE}" - ISO="arcolinux${EDITION}-${RELEASE}-x86_64.iso" + ISO="arcolinux${EDITION:0:1}-${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}" @@ -877,15 +865,11 @@ function get_cachyos() { } function get_debian() { - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local URL="" - if [ -n "${1}" ]; then - EDITION="${1}" - fi - case ${RELEASE} in 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/" @@ -929,17 +913,13 @@ function get_elementary() { } function get_fedora() { - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local JSON="" local URL="" local VARIANT="" - if [ -n "${1}" ]; then - EDITION="${1}" - fi - case ${EDITION} in Server|Silverblue|Workstation) VARIANT="${EDITION}";; *) VARIANT="Spins";; @@ -969,15 +949,11 @@ function get_freebsd() { function get_garuda() { local BRANCH="" - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local URL="" - if [ -n "${1}" ]; then - EDITION="${1}" - fi - case ${EDITION} in cinnamon|mate) BRANCH="community";; *) BRANCH="garuda";; @@ -1004,15 +980,11 @@ function get_gentoo() { } function get_ghostbsd() { - local EDITION="" + local EDITION="${1:-}" 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";; @@ -1026,15 +998,11 @@ function get_ghostbsd() { } function get_haiku() { - local EDITION="" + local EDITION="${1:-}" 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) @@ -1085,15 +1053,11 @@ function get_kolibrios() { } function get_linuxmint() { - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local URL="" - if [ -n "${1}" ]; then - EDITION="${1}" - fi - 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) @@ -1194,15 +1158,11 @@ function get_manjaro() { } function get_mxlinux() { - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local URL="" - if [ -n "${1}" ]; then - EDITION="${1}" - fi - case ${EDITION} in xfce) URL="https://sourceforge.net/projects/mx-linux/files/Final/Xfce" @@ -1248,15 +1208,11 @@ function get_netbsd() { } function get_nixos() { - local EDITION="" + local EDITION="${1:-}" 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) @@ -1327,15 +1283,11 @@ function get_oraclelinux() { } function get_popos() { - local EDITION="" + local EDITION="${1:-}" 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/") @@ -1347,16 +1299,12 @@ function get_popos() { } function get_regolith() { - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local SUBDIR="" local URL="" - 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";; @@ -1373,15 +1321,11 @@ function get_regolith() { } function get_rockylinux() { - local EDITION="" + local EDITION="${1:-}" 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) @@ -1413,15 +1357,11 @@ function get_slackware() { } function get_solus() { - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local URL="" - if [ -n "${1}" ]; then - EDITION="${1}" - fi - case ${EDITION} in mate|gnome) EDITION=${EDITION^^};; @@ -1503,15 +1443,12 @@ function get_ubuntu() { function get_void() { local DATE="" - local EDITION="" + local EDITION="${1:-}" local HASH="" local ISO="" local URL="https://alpha.de.repo.voidlinux.org/live/current" 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";; @@ -1525,14 +1462,10 @@ function get_void() { } function get_zorin() { - local EDITION="" + local EDITION="${1:-}" local ISO="" local URL="" - if [ -n "${1}" ]; then - EDITION="${1}" - fi - # 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##*/}" From ee0a25472f9d3330b96dc9e828d857dc14d91c14 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 15:19:34 +0000 Subject: [PATCH 04/61] Drop 21.04 (Hirsute) based releases. They are EOL. --- quickget | 3 --- 1 file changed, 3 deletions(-) diff --git a/quickget b/quickget index cbe6b70..422f635 100755 --- a/quickget +++ b/quickget @@ -454,7 +454,6 @@ function releases_oraclelinux() { function releases_popos() { echo 20.04 \ - 21.04 \ 21.10 } @@ -465,7 +464,6 @@ function editions_popos() { function releases_regolith() { echo focal \ - hirsute \ impish } @@ -512,7 +510,6 @@ function releases_tails() { function releases_ubuntu() { echo 18.04 \ 20.04 \ - 21.04 \ 21.10 \ devel \ canary From 45cdc5e217e1393f7b95a13f14fa9d3655e282aa Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 15:29:46 +0000 Subject: [PATCH 05/61] Refactor get_popos() --- quickget | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index 422f635..4de5c6d 100755 --- a/quickget +++ b/quickget @@ -1285,11 +1285,9 @@ function get_popos() { local ISO="" local URL="" - 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}/${EDITION}" | jq ".sha_sum") - HASH="${HASH//\"/}" + URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .url) + ISO="${URL##*/}" + HASH=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .sha_sum) web_get "${URL}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" make_vm_config "${ISO}" From 15ff54d2089dc444933c7ca4bc2afb567a020fa8 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 18:40:42 +0000 Subject: [PATCH 06/61] releases_() generators are always ascending order --- quickget | 43 +++++++++++++++++++------------------------ 1 file changed, 19 insertions(+), 24 deletions(-) diff --git a/quickget b/quickget index 4de5c6d..740a28e 100755 --- a/quickget +++ b/quickget @@ -216,17 +216,17 @@ function editions_alma() { } function releases_alpine() { - echo latest \ - 3.12 \ + echo 3.12 \ 3.13 \ 3.14 \ - 3.15 + 3.15 \ + latest } function releases_android() { - echo 9.0 \ + echo 7.1 \ 8.1 \ - 7.1 + 9.0 } function editions_android() { @@ -305,8 +305,7 @@ function releases_freebsd(){ } function releases_garuda() { - echo 220131 \ - 220220 + echo 220131 } function editions_garuda() { @@ -351,8 +350,8 @@ function editions_haiku() { } function releases_kali() { - echo latest \ - weekly + echo current \ + kali-weekly } function releases_kdeneon() { @@ -410,9 +409,9 @@ function releases_netboot() { } function releases_netbsd() { - echo 9.2 \ + echo 9.0 \ 9.1 \ - 9.0 + 9.2 } function releases_nixos(){ @@ -443,13 +442,13 @@ function releases_opensuse(){ } function releases_oraclelinux() { - echo 8.5 \ - 8.4 \ - 8.3 \ - 8.2 \ - 7.9 \ + echo 7.7 \ 7.8 \ - 7.7 + 7.9 \ + 8.2 \ + 8.3 \ + 8.4 \ + 8.5 } function releases_popos() { @@ -473,12 +472,9 @@ function editions_regolith() { } function releases_rockylinux() { - echo 8.5 \ + echo 8.3 \ 8.4 \ - 8.3 \ - 8.2 \ - 8.1 \ - 8.0 + 8.5 } function editions_rockylinux() { @@ -488,8 +484,7 @@ function editions_rockylinux() { function releases_slackware() { echo 14.2 \ - 15.0 \ - current + 15.0 } function releases_solus() { From 29c282953486d71f14158e879719dd4837063844 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 18:42:12 +0000 Subject: [PATCH 07/61] Clean up variable assignment in get_windows() --- quickget | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quickget b/quickget index 740a28e..33ba775 100755 --- a/quickget +++ b/quickget @@ -1768,7 +1768,7 @@ function get_windows() { local ARCH="x64" local INDEX=0 local LANG_CODE="en" - local LANG_EDITION="" + local LANG_EDITION="${1}" local LATEST_WINDOWS_VERSION="" local WINDOWS_NAME="" local VERSION_ID="" @@ -1780,8 +1780,6 @@ function get_windows() { local DOWNLOAD_ID="" local DOWNLOAD_URL="" - LANG_EDITION="${1}" - # Ignore the most recent Windows 10 release for now. case ${RELEASE} in 10) INDEX=0;; From d20ad7aa1c17bf37047e35da340bef246b83deab Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 18:44:02 +0000 Subject: [PATCH 08/61] Add create_vm() create_vm() is a helper function that will make it possible to remove boiler plate from (most) get_() functions. --- quickget | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/quickget b/quickget index 33ba775..b651b56 100755 --- a/quickget +++ b/quickget @@ -1845,6 +1845,22 @@ function get_windows() { make_vm_config "${FILE_NAME}" "virtio-win.iso" } +create_vm() { + # shellcheck disable=SC2206 + local URL_HASH=(${1// / }) + local URL="${URL_HASH[0]}" + local HASH="${URL_HASH[1]}" + local ISO="${URL##*/}" + #echo "${URL}" + #echo "${ISO}" + #echo "${HASH}" + web_get "${URL}" "${VM_PATH}" + if [ -n "${HASH}" ]; then + check_hash "${ISO}" "${HASH}" + fi + make_vm_config "${ISO}" +} + trap cleanup EXIT if ((BASH_VERSINFO[0] < 4)) From 6b86e81e729b2f3d564485a6219a079258588bd0 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Tue, 22 Feb 2022 18:48:42 +0000 Subject: [PATCH 09/61] macOS, Windows & Ubuntu do not use create_vm() The get_() function for macOS, Windows and Ubuntu are more complete because they do not solely use wget/aria2. Their get_() functions include the code to create VMs and therefore do not use the generic create_vm() helper. --- quickget | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quickget b/quickget index b651b56..3a314e4 100755 --- a/quickget +++ b/quickget @@ -1931,7 +1931,12 @@ if [ -n "${2}" ]; then VM_PATH="${OS}-${RELEASE}-${EDITION}" validate_release releases_"${OS}" get_"${OS}" "${EDITION}" + elif [ "${OS}" == "macos" ]; then + # macOS doesn't use create_vm() + validate_release releases_macos + get_macos elif [[ "${OS}" == *"ubuntu"* ]]; then + # Ubuntu doesn't use create_vm() validate_release releases_ubuntu get_ubuntu elif [ "${OS}" == "windows" ]; then @@ -1946,6 +1951,7 @@ if [ -n "${2}" ]; then exit 1 fi fi + # Windows doesn't use create_vm() validate_release releases_windows get_windows "${LANG}" else From eaae0f72e867d68844f884488792af67d3018c6e Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 03:24:56 +0000 Subject: [PATCH 10/61] Fiz get_zsync() so it correctly falls back to web_get() --- quickget | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) diff --git a/quickget b/quickget index 3a314e4..ebaacb3 100755 --- a/quickget +++ b/quickget @@ -639,36 +639,37 @@ function web_get() { function zsync_get() { local DIR="${2}" - local FILE="" + local FILE="${1##*/}" local OUT="" local URL="${1}" - local ZS="" - - FILE="${URL##*/}" if command -v zsync &>/dev/null; then - if [ -n "${3}" ]; then - OUT="${3}" - else - OUT="${FILE}" - fi + if [ -n "${3}" ]; then + OUT="${3}" + else + OUT="${FILE}" + fi - if ! mkdir -p "${DIR}" 2>/dev/null; then - echo "ERROR! Unable to create directory ${DIR}" - exit 1 - fi - - if ! zsync "${URL}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then - echo "ERROR! Failed to download ${URL}.zsync" + if ! mkdir -p "${DIR}" 2>/dev/null; then + echo "ERROR! Unable to create directory ${DIR}" exit 1 - fi + fi - if [ -e "${DIR}/${OUT}.zs-old" ]; then - rm "${DIR}/${OUT}.zs-old" - fi + 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/aria2c" - web_get "${ISO}" "${DIR}" + echo "INFO: zsync not found, falling back to wget/aria2c" + if [ -n "${3}" ]; then + web_get "${1}" "${2}" "${3}" + else + web_get "${1}" "${2}" + fi fi } From 368b24936ef8d2a6968ea9bffb78d16f01a54a6e Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 03:31:04 +0000 Subject: [PATCH 11/61] Refactor Ubuntu support Use release and project labels found on cdimage. --- quickget | 57 +++++++++++++++++++++----------------------------------- 1 file changed, 21 insertions(+), 36 deletions(-) diff --git a/quickget b/quickget index ebaacb3..ba733b5 100755 --- a/quickget +++ b/quickget @@ -196,9 +196,9 @@ function os_support() { tails \ ubuntu \ ubuntu-budgie \ - ubuntu-kylin \ + ubuntukylin \ ubuntu-mate \ - ubuntu-studio \ + ubuntustudio \ void \ windows \ xubuntu \ @@ -503,11 +503,7 @@ function releases_tails() { } function releases_ubuntu() { - echo 18.04 \ - 20.04 \ - 21.10 \ - devel \ - canary + echo 18.04 20.04 21.10 daily-live daily-canary } function releases_void() { @@ -1386,45 +1382,34 @@ function get_tails() { } function get_ubuntu() { - local DEVEL="daily-live" local ISO="" local HASH="" - 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";; - *) echo "ERROR! ${OS} is not a recognised Ubuntu flavour." - exit 1;; - esac - - if [ "${RELEASE}" == "canary" ] && [ "${OS}" != "ubuntu" ]; then - echo "ERROR! Canary is currently only available for Ubuntu." - exit 1 + if [[ "${RELEASE}" == *"daily"* ]] && [ "${OS}" == "ubuntustudio" ]; then + # Ubuntu Studio daily-live images are in the dvd directory + RELEASE="dvd" + elif [ "${RELEASE}" == "daily-canary" ] && [ "${OS}" != "ubuntu" ]; then + # daily-canary is only available for Ubuntu, switch flavours to daily-live + RELEASE="daily-live" fi - if [ "${RELEASE}" == "canary" ]; then - DEVEL="daily-canary" - URL="http://cdimage.ubuntu.com/${PROJECT}/${DEVEL}/current" - elif [ "${RELEASE}" == "devel" ]; then - URL="http://cdimage.ubuntu.com/${PROJECT}/${DEVEL}/current" - elif [ "${PROJECT}" == "ubuntu" ]; then + if [[ "${RELEASE}" == *"daily"* ]] || [ "${RELEASE}" == "dvd" ]; then + URL="http://cdimage.ubuntu.com/${OS}/${RELEASE}/current" + VM_PATH="${OS}-devel" + elif [ "${OS}" == "ubuntu" ]; then URL="http://releases.ubuntu.com/${RELEASE}" else - URL="http://cdimage.ubuntu.com/${PROJECT}/releases/${RELEASE}/release" + URL="http://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release" fi - 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') - if [ "${RELEASE}" == "canary" ] || [ "${RELEASE}" == "devel" ]; then - zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-${RELEASE}.iso" - make_vm_config "${OS}-${RELEASE}.iso" + ISO=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd' | grep amd64 | cut -d'*' -f2) + HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep 'desktop\|dvd' | grep amd64 | cut -d' ' -f1) + #echo "${URL}/${ISO} ${HASH}" + + if [[ "${RELEASE}" == *"daily"* ]] || [ "${RELEASE}" == "dvd" ]; then + zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso" + make_vm_config "${OS}-devel.iso" else web_get "${URL}/${ISO}" "${VM_PATH}" check_hash "${ISO}" "${HASH}" From 85cb9251a0bb837e2dc797309d28554c46e68f5d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 03:33:00 +0000 Subject: [PATCH 12/61] Collapse releases_() and editions_() where reasonable to do so --- quickget | 159 ++++++++++++++----------------------------------------- 1 file changed, 40 insertions(+), 119 deletions(-) diff --git a/quickget b/quickget index ba733b5..6372241 100755 --- a/quickget +++ b/quickget @@ -206,32 +206,23 @@ function os_support() { } function releases_alma() { - echo 8.4 \ - 8.5 + echo 8.4 8.5 } function editions_alma() { - echo minimal \ - dvd + echo minimal dvd } function releases_alpine() { - echo 3.12 \ - 3.13 \ - 3.14 \ - 3.15 \ - latest + echo 3.12 3.13 3.14 3.15 latest } function releases_android() { - echo 7.1 \ - 8.1 \ - 9.0 + echo 7.1 8.1 9.0 } function editions_android() { - echo x86 \ - x86_64 + echo x86 x86_64 } function releases_archlinux() { @@ -239,40 +230,27 @@ function releases_archlinux() { } function releases_arcolinux() { - echo v21.09.11 \ - v21.11.05 \ - v22.01.10 + echo v21.09.11 v21.11.05 v22.01.10 } function editions_arcolinux() { - echo large \ - small + echo large small } function releases_cachyos() { - echo 2022.01.09 \ - 2022.02.11 + echo 2022.01.09 2022.02.11 } function releases_debian() { - echo 10.11.0 \ - 11.2.0 + echo 10.11.0 11.2.0 } function editions_debian() { - echo standard \ - cinnamon \ - gnome \ - kde \ - lxde \ - lxqt \ - mate \ - xfce + echo standard cinnamon gnome kde lxde lxqt mate xfce } function releases_devuan() { - echo beowulf \ - chimaera + echo beowulf chimaera } function releases_elementary() { @@ -280,9 +258,7 @@ function releases_elementary() { } function releases_fedora() { - echo 33 \ - 34 \ - 35 + echo 33 34 35 } function editions_fedora() { @@ -299,9 +275,7 @@ function editions_fedora() { } function releases_freebsd(){ - echo 12.2 \ - 12.3 \ - 13.0 + echo 12.2 12.3 13.0 } function releases_garuda() { @@ -325,19 +299,16 @@ function editions_garuda() { xfce } -function releases_gentoo(){ +function releases_gentoo() { echo latest } -function releases_ghostbsd(){ - echo 21.10.16 \ - 21.11.24 \ - 22.01.12 +function releases_ghostbsd() { + echo 21.10.16 21.11.24 22.01.12 } -function editions_ghostbsd(){ - echo mate \ - xfce +function editions_ghostbsd() { + echo mate xfce } function releases_haiku() { @@ -345,20 +316,15 @@ function releases_haiku() { } function editions_haiku() { - echo x86_64 \ - x86_gcc2h + echo x86_64 x86_gcc2h } function releases_kali() { - echo current \ - kali-weekly + echo current kali-weekly } function releases_kdeneon() { - echo user \ - testing \ - unstable \ - developer + echo user testing unstable developer } function releases_kolibrios() { @@ -370,9 +336,7 @@ function releases_linuxmint(){ } function editions_linuxmint(){ - echo cinnamon \ - mate \ - xfce + echo cinnamon mate xfce } function releases_mxlinux(){ @@ -380,17 +344,11 @@ function releases_mxlinux(){ } function editions_mxlinux(){ - echo xfce \ - kde \ - fluxbox + echo Xfce KDE Fluxbox } function releases_macos() { - echo high-sierra \ - mojave \ - catalina \ - big-sur \ - monterey + echo high-sierra mojave catalina big-sur monterey } function releases_manjaro() { @@ -409,72 +367,47 @@ function releases_netboot() { } function releases_netbsd() { - echo 9.0 \ - 9.1 \ - 9.2 + echo 9.0 9.1 9.2 } function releases_nixos(){ - echo 21.05 \ - 21.11 + echo 21.05 21.11 } function editions_nixos(){ - echo gnome \ - plasma5 \ - minimal + echo gnome plasma5 minimal } function releases_openbsd(){ - echo 6.7 \ - 6.8 \ - 6.9 \ - 7.0 + echo 6.7 6.8 6.9 7.0 } function releases_opensuse(){ - echo 15.0 \ - 15.1 \ - 15.2 \ - 15.3 \ - microos \ - tumbleweed + echo 15.0 15.1 15.2 15.3 microos tumbleweed } function releases_oraclelinux() { - echo 7.7 \ - 7.8 \ - 7.9 \ - 8.2 \ - 8.3 \ - 8.4 \ - 8.5 + echo 7.7 7.8 7.9 8.2 8.3 8.4 8.5 } function releases_popos() { - echo 20.04 \ - 21.10 + echo 20.04 21.10 } function editions_popos() { - echo intel \ - nvidia + echo intel nvidia } function releases_regolith() { - echo focal \ - impish + echo focal impish } function editions_regolith() { - echo 1.6.0 \ - 2.0.0 + echo 1.6.0 2.0.0 } function releases_rockylinux() { - echo 8.3 \ - 8.4 \ - 8.5 + echo 8.3 8.4 8.5 } function editions_rockylinux() { @@ -483,8 +416,7 @@ function editions_rockylinux() { } function releases_slackware() { - echo 14.2 \ - 15.0 + echo 14.2 15.0 } function releases_solus() { @@ -492,10 +424,7 @@ function releases_solus() { } function editions_solus() { - echo budgie \ - gnome \ - mate \ - plasma + echo Budgie GNOME MATE Plasma } function releases_tails() { @@ -511,16 +440,11 @@ function releases_void() { } function editions_void() { - echo glibc \ - musl \ - xfce-glibc \ - xfce-musl + echo glibc musl xfce-glibc xfce-musl } function releases_windows() { - echo 8 \ - 10 \ - 11 + echo 8 10 11 } function languages_windows() { @@ -569,10 +493,7 @@ function releases_zorin() { } function editions_zorin() { - echo core64 \ - lite64 \ - education64 \ - edulite64 + echo core64 lite64 education64 edulite64 } function check_hash() { From 921d06e025270e307b5cda0e0b17fec5c025eb67 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 03:33:32 +0000 Subject: [PATCH 13/61] Minor code clean up --- quickemu | 4 ++-- quickget | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/quickemu b/quickemu index 398b6d6..9a1e0b0 100755 --- a/quickemu +++ b/quickemu @@ -1023,8 +1023,8 @@ function shortcut_create { local dirname="${HOME}/.local/share/applications" local filename="${HOME}/.local/share/applications/${VMNAME}.desktop" - if [ ! -d ${dirname} ]; then - mkdir -p ${dirname} + if [ ! -d "${dirname}" ]; then + mkdir -p "${dirname}" fi cat << EOF > "${filename}" [Desktop Entry] diff --git a/quickget b/quickget index 6372241..2868595 100755 --- a/quickget +++ b/quickget @@ -1770,10 +1770,9 @@ create_vm() { trap cleanup EXIT -if ((BASH_VERSINFO[0] < 4)) -then - echo "Sorry, you need bash 4.0 or newer to run this script." - exit 1 +if ((BASH_VERSINFO[0] < 4)); then + echo "Sorry, you need bash 4.0 or newer to run this script." + exit 1 fi LANGS=() From 958ef84931a9aecc57e3197db3312d6dc53c5506 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 03:37:28 +0000 Subject: [PATCH 14/61] White space cleanup --- quickget | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index 2868595..c44459b 100755 --- a/quickget +++ b/quickget @@ -1347,10 +1347,10 @@ function get_void() { DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4) 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";; + 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 HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)" web_get "${URL}/${ISO}" "${VM_PATH}" @@ -1698,7 +1698,6 @@ function get_windows() { dbg_windows "${WINDOWS_VERSIONS}" LATEST_WINDOWS_VERSION=$(echo "${WINDOWS_VERSIONS}" | jq -c 'map(select(.name | contains("Windows '"${RELEASE}"'")))['${INDEX}']') dbg_windows "${LATEST_WINDOWS_VERSION}" - WINDOWS_NAME=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .name) dbg_windows "${WINDOWS_NAME}" VERSION_ID=$(echo "${LATEST_WINDOWS_VERSION}" | jq -r .version_id) From d1a984ff128358bb13c1e57252ad168c2223e6d3 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 09:53:27 +0000 Subject: [PATCH 15/61] Minor code cleanup --- quickemu | 10 +++++----- quickget | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/quickemu b/quickemu index 9a1e0b0..e5bfc35 100755 --- a/quickemu +++ b/quickemu @@ -1,8 +1,7 @@ #!/usr/bin/env bash export LC_ALL=C -if ((BASH_VERSINFO[0] < 4)) -then +if ((BASH_VERSINFO[0] < 4)); then echo "Sorry, you need bash 4.0 or newer to run this script." exit 1 fi @@ -992,8 +991,8 @@ function vm_boot() { -device tpm-tis,tpmdev=tpm0) fi - if [ -n "$extra_args" ]; then - args+=($extra_args) + if [ -n "${extra_args}" ]; then + args+=("${extra_args}") fi # The OSK parameter contains parenthesis, they need to be escaped in the shell @@ -1078,6 +1077,7 @@ bridge="" cpu_cores="" disk_img="" disk_size="" +extra_args="" fixed_iso="" floppy="" guest_os="linux" @@ -1090,7 +1090,6 @@ ram="" secureboot="off" tpm="off" usb_devices=() -extra_args="" BRAILLE="" DELETE_DISK=0 @@ -1112,6 +1111,7 @@ VMDIR="" VMNAME="" VMPATH="" +# shellcheck disable=SC2155 readonly LAUNCHER=$(basename "${0}") readonly DISK_MIN_SIZE=$((197632 * 8)) readonly VERSION="3.12" diff --git a/quickget b/quickget index c44459b..6cf0af3 100755 --- a/quickget +++ b/quickget @@ -1,4 +1,5 @@ #!/usr/bin/env bash +export LC_ALL=C # Here the quick 'n dirty guide to adding a new OS to quickget # From 7fe2980b1391395eb8526c37a8098c4f4ed824ff Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 09:53:41 +0000 Subject: [PATCH 16/61] Bump version to 3.13 --- quickemu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/quickemu b/quickemu index e5bfc35..f784cc4 100755 --- a/quickemu +++ b/quickemu @@ -1114,7 +1114,7 @@ VMPATH="" # shellcheck disable=SC2155 readonly LAUNCHER=$(basename "${0}") readonly DISK_MIN_SIZE=$((197632 * 8)) -readonly VERSION="3.12" +readonly VERSION="3.13" # PUBLICSHARE is the only directory exposed to guest VMs for file # sharing via 9P, spice-webdavd and Samba. This path is not configurable. From 30ebabab04f286eccfa8cf6bdbb6b2947d620741 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 09:59:27 +0000 Subject: [PATCH 17/61] Enable create_vm() for most OSs --- quickget | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/quickget b/quickget index 6cf0af3..c817c57 100755 --- a/quickget +++ b/quickget @@ -12,16 +12,11 @@ export LC_ALL=C # function get_newos() { # local EDITION="${1:-}" # local HASH="" -# local ISO="" -# local URL="" +# local ISO="newos-${RELEASE}-${EDITION}-amd64.iso" +# local URL="https://www.newos.org/download/${RELEASE}/${EDITION}" # -# 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=$(cut -d' ' -f1 < "${VM_PATH}/SHA256SUMS") -# check_hash "${ISO}" "${HASH}" -# make_vm_config "${ISO}" +# HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1) +# echo "${URL}/${ISO} ${HASH}" # } function cleanup() { @@ -1835,8 +1830,8 @@ if [ -n "${2}" ]; then fi VM_PATH="${OS}-${RELEASE}-${EDITION}" - validate_release releases_"${OS}" - get_"${OS}" "${EDITION}" + validate_release "releases_${OS}" + create_vm "$("get_${OS}" "${EDITION}")" elif [ "${OS}" == "macos" ]; then # macOS doesn't use create_vm() validate_release releases_macos @@ -1861,8 +1856,8 @@ if [ -n "${2}" ]; then validate_release releases_windows get_windows "${LANG}" else - validate_release releases_"${OS}" - get_"${OS}" + validate_release "releases_${OS}" + create_vm "$("get_${OS}")" fi else echo "ERROR! You must specify a release." From 7dc6572bdff7b9675d5d176c06da3c94a896c4ca Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:02:25 +0000 Subject: [PATCH 18/61] Refactor get_alma() to add create_vm() compatibility --- quickget | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/quickget b/quickget index c817c57..fa4805b 100755 --- a/quickget +++ b/quickget @@ -674,15 +674,10 @@ EOF function get_alma() { local EDITION="${1:-}" local HASH="" - local ISO="" - local URL="" - - 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}" - make_vm_config "${ISO}" + local ISO="AlmaLinux-${RELEASE}-x86_64-${EDITION}.iso" + local URL="http://lon.mirror.rackspace.com/almalinux/${RELEASE}/isos/x86_64/" + HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep "(${ISO}" | cut -d' ' -f4)" + echo "${URL}/${ISO} ${HASH}" } function get_alpine() { From 4f5752bb0d535da36c8889511995b9a994b3041e Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:04:05 +0000 Subject: [PATCH 19/61] Refactor get_alpine() to add create_vm() compatibility --- quickget | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index fa4805b..b6c6d74 100755 --- a/quickget +++ b/quickget @@ -685,20 +685,15 @@ function get_alpine() { local ISO="" local URL="" local VERSION="" - local BRANCH="" case ${RELEASE} in - latest) BRANCH="latest-stable";; - *) BRANCH="v${RELEASE}";; + latest) URL="https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64";; + *) URL="https://dl-cdn.alpinelinux.org/alpine/v${RELEASE}/releases/x86_64";; esac - - 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" - 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}" + echo "${URL}/${ISO} ${HASH}" } function get_android() { From 5ba5847d21733f8d41e58bcdce16939203f74dd6 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:09:07 +0000 Subject: [PATCH 20/61] Refactor get_android() to add create_vm() compatibility --- quickget | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index b6c6d74..6a90b1d 100755 --- a/quickget +++ b/quickget @@ -708,17 +708,14 @@ function get_android() { JSON_REL=$(echo "${JSON_ALL}" | jq --arg ver "${OS}-${EDITION}-${RELEASE}" 'first(.pool.f[] | select((.n | startswith($ver)) and (.n | endswith(".iso"))))') ISO=$(echo "${JSON_REL}" | jq -r .n) HASH=$(echo "${JSON_REL}" | jq -r .hash.sha256) - # Traverse the directories to find the .iso location - for DIR in $(wget -q -O- ${URL} | grep -o -E '[0-9]{5}' | sort -ur); do + for DIR in $(wget -q -O- "${URL}" | grep -o -E '[0-9]{5}' | sort -ur); do if wget -q -O- "${URL}/${DIR}" | grep "${ISO}" &>/dev/null; then URL="${URL}/${DIR}" break fi done - web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_archlinux() { From b67c272d1903f017c484fe894e2fd45a6f13ab34 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:11:01 +0000 Subject: [PATCH 21/61] Refactor get_archlinux() to add create_vm() compatibility --- quickget | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/quickget b/quickget index 6a90b1d..a8aab96 100755 --- a/quickget +++ b/quickget @@ -721,16 +721,10 @@ function get_android() { function get_archlinux() { local HASH="" local ISO="" - local URL="" - local VERSION="" - - 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" - 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}" + local URL="https://mirror.rackspace.com/archlinux" + ISO=$(wget -q -O- "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].iso_url') + HASH=$(wget -q -O- "https://archlinux.org/releng/releases/json/" | jq -r '.releases[0].sha1_sum') + echo "${URL}/${ISO} ${HASH}" } function get_arcolinux() { From c31fa21cb994e0924cedac685aab5d47cd4a5747 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:20:09 +0000 Subject: [PATCH 22/61] Refactor get_arcolinux() to add create_vm() compatibility --- quickget | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/quickget b/quickget index a8aab96..b7cd957 100755 --- a/quickget +++ b/quickget @@ -730,15 +730,10 @@ function get_archlinux() { function get_arcolinux() { local EDITION="${1:-}" local HASH="" - local ISO="" - local URL="" - - URL="https://ant.seedhost.eu/arcolinux/iso/${RELEASE}" - ISO="arcolinux${EDITION:0:1}-${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}" + local ISO="arcolinux${EDITION:0:1}-${RELEASE}-x86_64.iso" + local URL="https://ant.seedhost.eu/arcolinux/iso/${RELEASE}" + HASH=$(wget -q -O- "${URL}/${ISO}.sha1" | cut -d' ' -f1) + echo "${URL}/${ISO} ${HASH}" } function get_cachyos() { From 3b3f005ae99bc54d1d146bdf8c370501301ea479 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:20:55 +0000 Subject: [PATCH 23/61] Refactor get_cachyos() to add create_vm() compatibility --- quickget | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index b7cd957..f154e71 100755 --- a/quickget +++ b/quickget @@ -738,12 +738,9 @@ function get_arcolinux() { function get_cachyos() { local HASH="" - local ISO="" + local ISO="cachyos-${RELEASE}-x86_64.iso" local URL="https://mirror.cachyos.org/ISO" - - ISO="cachyos-${RELEASE}-x86_64.iso" - web_get "${URL}/${ISO}" "${VM_PATH}" - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_debian() { From e96fc18f1f75523d5695eb1682d2a89cdd8c25c0 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:29:25 +0000 Subject: [PATCH 24/61] Refactor get_debian() to add create_vm() compatibility --- quickget | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/quickget b/quickget index f154e71..16b9598 100755 --- a/quickget +++ b/quickget @@ -746,19 +746,15 @@ function get_cachyos() { function get_debian() { local EDITION="${1:-}" local HASH="" - local ISO="" + local ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso" local URL="" case ${RELEASE} in 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/" + *) URL="https://cdimage.debian.org/cdimage/archive/${RELEASE}-live/amd64/iso-hybrid/";; esac - - 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}" + echo "${URL}/${ISO} ${HASH}" } function get_devuan() { From cf231a8e2ca12ee10e25bb97582ba3c20574fa8a Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:30:15 +0000 Subject: [PATCH 25/61] Refactor get_devuan() to add create_vm() compatibility --- quickget | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/quickget b/quickget index 16b9598..bc120c3 100755 --- a/quickget +++ b/quickget @@ -760,20 +760,14 @@ function get_debian() { function get_devuan() { local HASH="" local ISO="" - local URL="" - local VERSION="" + local URL="https://files.devuan.org/devuan_${RELEASE}/desktop-live" case ${RELEASE} in - beowulf) VERSION="3.1.1";; - chimaera) VERSION="4.0.0";; + beowulf) ISO="devuan_${RELEASE}_3.1.1_amd64_desktop-live.iso";; + chimaera) ISO="devuan_${RELEASE}_4.0.0_amd64_desktop-live.iso";; 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}" + echo "${URL}/${ISO} ${HASH}" } function get_elementary() { From 0a1877d4c3b76f47873c01cdc24e94fbe41651e5 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:30:45 +0000 Subject: [PATCH 26/61] Refactor get_elementary() to add create_vm() compatibility --- quickget | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index bc120c3..a4101f0 100755 --- a/quickget +++ b/quickget @@ -771,14 +771,10 @@ function get_devuan() { } function get_elementary() { - local ISO="" - local ISOTAG="20211218-rc" - local URL="" - - ISO="elementaryos-${RELEASE}-stable.${ISOTAG}.iso" - URL="https://ams3.dl.elementary.io/download/$(date +%s | base64)=/${ISO}" - web_get "${URL}" "${VM_PATH}" - make_vm_config "${ISO}" + local HASH="" + local ISO="elementaryos-${RELEASE}-stable.20211218-rc.iso" + local URL="https://ams3.dl.elementary.io/download" + echo "${URL}/$(date +%s | base64)/${ISO} ${HASH}" } function get_fedora() { From 8af32ca26ce45e2c2c79fb00f4e9cef0833411f2 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:31:53 +0000 Subject: [PATCH 27/61] Refactor get_fedora() to add create_vm() compatibility --- quickget | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/quickget b/quickget index a4101f0..a108e8a 100755 --- a/quickget +++ b/quickget @@ -792,11 +792,8 @@ function get_fedora() { 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}" + echo "${URL} ${HASH}" } function get_freebsd() { From 6941a797d406ff4d911cb25f6208a07ed925d6f2 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:32:53 +0000 Subject: [PATCH 28/61] Refactor get_freebsd() to add create_vm() compatibility --- quickget | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index a108e8a..657740d 100755 --- a/quickget +++ b/quickget @@ -798,15 +798,11 @@ function get_fedora() { function get_freebsd() { local HASH="" - local ISO="" - local URL="" + local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-dvd1.iso" + local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}" - 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}" + HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4) + echo "${URL}/${ISO} ${HASH}" } function get_garuda() { From 039d1773e4bc3638da59e93e80751a31222a6b18 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:33:49 +0000 Subject: [PATCH 29/61] Refactor get_garuda() to add create_vm() compatibility --- quickget | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/quickget b/quickget index 657740d..abf80e0 100755 --- a/quickget +++ b/quickget @@ -806,23 +806,18 @@ function get_freebsd() { } function get_garuda() { - local BRANCH="" local EDITION="${1:-}" local HASH="" local ISO="" local URL="" case ${EDITION} in - cinnamon|mate) BRANCH="community";; - *) BRANCH="garuda";; + cinnamon|mate) URL="http://mirrors.fossho.st/garuda/iso/community/${EDITION}/${RELEASE}";; + *) URL="http://mirrors.fossho.st/garuda/iso/garuda/${EDITION}/${RELEASE}";; esac - - URL="http://mirrors.fossho.st/garuda/iso/${BRANCH}/${EDITION}/${RELEASE}" - ISO="${OS}-${EDITION}-linux-zen-${RELEASE}.iso" + ISO="garuda-${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}" + echo "${URL}/${ISO} ${HASH}" } function get_gentoo() { From 0ea2d1b3aa38610a5e4959ec4506ded68b41c016 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:34:59 +0000 Subject: [PATCH 30/61] Refactor get_gentoo() to add create_vm() compatibility --- quickget | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quickget b/quickget index abf80e0..bd40035 100755 --- a/quickget +++ b/quickget @@ -827,9 +827,7 @@ function get_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}" - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_ghostbsd() { From c36463d85d8f3d4559617446e2f231daac14ca2d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:36:07 +0000 Subject: [PATCH 31/61] Refactor get_ghostbsd() to add create_vm() compatibility --- quickget | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/quickget b/quickget index bd40035..5af6d27 100755 --- a/quickget +++ b/quickget @@ -833,19 +833,15 @@ function get_gentoo() { function get_ghostbsd() { local EDITION="${1:-}" local ISO="" - local URL="" + local URL="https://download.ghostbsd.org/releases/amd64/${RELEASE}" local HASH="" 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}" + HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4) + echo "${URL}/${ISO} ${HASH}" } function get_haiku() { From 723a185346c379b573ab6a0f090597cec69d5422 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:37:17 +0000 Subject: [PATCH 32/61] Refactor get_haiku() to add create_vm() compatibility --- quickget | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/quickget b/quickget index 5af6d27..6dcf6fc 100755 --- a/quickget +++ b/quickget @@ -846,16 +846,12 @@ function get_ghostbsd() { function get_haiku() { local EDITION="${1:-}" - local ISO="" - local URL="" + local ISO="haiku-${RELEASE}-${EDITION}-anyboot.iso" + local URL="https://cdn.haiku-os.org/haiku-release/${RELEASE}" local HASH="" - 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}" + echo "${URL}/${ISO} ${HASH}" } function get_kali() { From 11aa53d64dc3e260d1b6c1a5ef6b2b734f6d0333 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:39:45 +0000 Subject: [PATCH 33/61] Refactor get_kali() to add create_vm() compatibility --- quickget | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/quickget b/quickget index 6dcf6fc..998df54 100755 --- a/quickget +++ b/quickget @@ -857,20 +857,11 @@ function get_haiku() { function get_kali() { local HASH="" local ISO="" - local URL="" - local SUBDIR="" + local URL="https://cdimage.kali.org/${RELEASE}" - case ${RELEASE} in - latest) SUBDIR="current";; - *) SUBDIR="kali-weekly";; - esac - - URL="https://cdimage.kali.org/${SUBDIR}" ISO=$(wget -q -O- "${URL}/?C=M;O=D" | grep -o ">kali-linux-.*-installer-amd64.iso" | head -n 1 | cut -c 2-) HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep -v torrent | grep "${ISO}" | cut -d' ' -f1) - web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_kdeneon() { From facb15b0d2aac7cb8f36c861f1e75ae762b9308d Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:40:31 +0000 Subject: [PATCH 34/61] Refactor get_kdeneon() to add create_vm() compatibility --- quickget | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/quickget b/quickget index 998df54..eedcaf1 100755 --- a/quickget +++ b/quickget @@ -867,14 +867,11 @@ function get_kali() { function get_kdeneon() { local HASH="" local ISO="" - local URL="" + local URL="https://files.kde.org/neon/images/${RELEASE}/current" - 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}" + echo "${URL}/${ISO} ${HASH}" } function get_kolibrios() { From 6ab206783b9cb7716d8a0b10e9fd8ccbb3068e0a Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:41:03 +0000 Subject: [PATCH 35/61] Refactor get_kolibrios() to add create_vm() compatibility --- quickget | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quickget b/quickget index eedcaf1..5154300 100755 --- a/quickget +++ b/quickget @@ -878,9 +878,7 @@ function get_kolibrios() { local HASH="" local ISO="kolibri.iso" local URL="https://builds.kolibrios.org/eng" - - web_get "${URL}/${ISO}" "${VM_PATH}" - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_linuxmint() { From 9073c5f2809946f2eca18be02020cbdd16732cb6 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:41:59 +0000 Subject: [PATCH 36/61] Refactor get_linuxmint() to add create_vm() compatibility --- quickget | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index 5154300..1161c7d 100755 --- a/quickget +++ b/quickget @@ -884,15 +884,11 @@ function get_kolibrios() { function get_linuxmint() { local EDITION="${1:-}" local HASH="" - local ISO="" - local URL="" + local ISO="linuxmint-${RELEASE}-${EDITION}-64bit.iso" + local URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}" - 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}" + HASH=$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f1) + echo "${URL}/${ISO} ${HASH}" } function get_macos() { From e57307e54adf6901939a974698bf05bb174159c0 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:42:57 +0000 Subject: [PATCH 37/61] Refactor get_manjaro() to add create_vm() compatibility --- quickget | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/quickget b/quickget index 1161c7d..a623ab9 100755 --- a/quickget +++ b/quickget @@ -960,26 +960,19 @@ function get_macos() { } 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";; + gnome|kde|xfce) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/official/${RELEASE}.md";; + budgie|cinnamon|deepin|i3|mate) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/community/${RELEASE}.md";; 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}" + URL="$(wget -qO- "${MANIFESTURL}" | grep "Download_x64 =" | cut -d'"' -f2)" + HASH=$(wget -qO- "${MANIFESTURL}" | grep "Download_x64_Checksum =" | cut -d'"' -f2) + echo "${URL} ${HASH}" } function get_mxlinux() { From 512aa14fe283789502cfff47d78c39ac38ca927b Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:48:25 +0000 Subject: [PATCH 38/61] Refactor get_mxlinux() to add create_vm() compatibility --- quickget | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/quickget b/quickget index a623ab9..2165238 100755 --- a/quickget +++ b/quickget @@ -979,26 +979,15 @@ function get_mxlinux() { local EDITION="${1:-}" local HASH="" local ISO="" - local URL="" + local URL="https://sourceforge.net/projects/mx-linux/files/Final/${EDITION}" 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" - ;; + Xfce) ISO="MX-${RELEASE}_x64.iso";; + KDE) ISO="MX-${RELEASE}_KDE_x64.iso";; + 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}" + echo "${URL}/${ISO} ${HASH}" } function get_netboot() { From c928d6caee43d17baeed7c452058f27244987948 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:49:11 +0000 Subject: [PATCH 39/61] Refactor get_netboot() to add create_vm() compatibility --- quickget | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/quickget b/quickget index 2165238..75bfd9b 100755 --- a/quickget +++ b/quickget @@ -994,11 +994,8 @@ 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}" + echo "${URL}/${ISO} ${HASH}" } function get_netbsd() { From 68609f11e8b56cb62dc476b959409a2b1fd1082f Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:51:01 +0000 Subject: [PATCH 40/61] Refactor get_netbsd() to add create_vm() compatibility --- quickget | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index 75bfd9b..21bd5e3 100755 --- a/quickget +++ b/quickget @@ -1000,15 +1000,10 @@ function get_netboot() { function get_netbsd() { local HASH="" - local ISO="" - local URL="" - - URL="https://cdn.netbsd.org/pub/NetBSD/NetBSD-${RELEASE}/images/" - ISO="NetBSD-${RELEASE}-amd64.iso" + local ISO="NetBSD-${RELEASE}-amd64.iso" + local URL="https://cdn.netbsd.org/pub/NetBSD/NetBSD-${RELEASE}/images/" 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}" + echo "${URL}/${ISO} ${HASH}" } function get_nixos() { From 5483823651d714817ba712380f8a1bd8f4c9a3f4 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:52:45 +0000 Subject: [PATCH 41/61] Refactor get_nixos() to add create_vm() compatibility --- quickget | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index 21bd5e3..218532f 100755 --- a/quickget +++ b/quickget @@ -1009,15 +1009,10 @@ function get_netbsd() { function get_nixos() { local EDITION="${1:-}" local HASH="" - local ISO="" - local URL="" - - URL="https://channels.nixos.org/nixos-${RELEASE}" - ISO="latest-nixos-${EDITION}-x86_64-linux.iso" + local ISO="latest-nixos-${EDITION}-x86_64-linux.iso" + local URL="https://channels.nixos.org/nixos-${RELEASE}" HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1) - web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_openbsd() { From 294a0c08939c5c2873cb06665208c87b273963c6 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:53:17 +0000 Subject: [PATCH 42/61] Refactor get_openbsd() to add create_vm() compatibility --- quickget | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/quickget b/quickget index 218532f..9d1105d 100755 --- a/quickget +++ b/quickget @@ -1017,15 +1017,10 @@ function get_nixos() { function get_openbsd() { local HASH="" - local ISO="" - local URL="" - - URL="https://cdn.openbsd.org/pub/OpenBSD/${RELEASE}/amd64" - ISO="install${RELEASE//\./}.iso" + local ISO="install${RELEASE//\./}.iso" + local URL="https://cdn.openbsd.org/pub/OpenBSD/${RELEASE}/amd64" 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}" + echo "${URL}/${ISO} ${HASH}" } function get_opensuse() { From 3e5af6378a971166e0aa60a5f40302d77e7e5f59 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:54:49 +0000 Subject: [PATCH 43/61] Refactor get_opensuse() to add create_vm() compatibility --- quickget | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/quickget b/quickget index 9d1105d..e2bc6ec 100755 --- a/quickget +++ b/quickget @@ -1030,24 +1030,19 @@ function get_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) + URL="https://download.opensuse.org/tumbleweed/iso" 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) + URL="https://download.opensuse.org/tumbleweed/iso" 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) + URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso" 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) + URL="https://download.opensuse.org/distribution/leap/${RELEASE}/iso" fi - web_get "${URL}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1) + echo "${URL}/${ISO} ${HASH}" } function get_oraclelinux() { From c553e404c9df6b9b83e46d25bd787bc608835732 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:55:29 +0000 Subject: [PATCH 44/61] Refactor get_oraclelinux() to add create_vm() compatibility --- quickget | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/quickget b/quickget index e2bc6ec..ac8a7a3 100755 --- a/quickget +++ b/quickget @@ -1048,22 +1048,16 @@ function get_opensuse() { function get_oraclelinux() { local HASH="" local ISO="" - local URL="" - local VER_MAJ="" - local VER_MIN="" + local VER_MAJ=${RELEASE::1} + local VER_MIN=${RELEASE:2:1} + local URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/" - 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 + case ${VER_MAJ} in + 8) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso";; + *) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso";; + esac 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}" + echo "${URL}/${ISO} ${HASH}" } function get_popos() { From 1310daeeaaba8dfc568acc34256de18edbe76277 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:56:59 +0000 Subject: [PATCH 45/61] Refactor get_popos() to add create_vm() compatibility --- quickget | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/quickget b/quickget index ac8a7a3..8ee11a4 100755 --- a/quickget +++ b/quickget @@ -1065,13 +1065,9 @@ function get_popos() { local HASH="" local ISO="" local URL="" - URL=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .url) - ISO="${URL##*/}" HASH=$(wget -q -O- "https://api.pop-os.org/builds/${RELEASE}/${EDITION}" | jq -r .sha_sum) - web_get "${URL}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + echo "${URL} ${HASH}" } function get_regolith() { From 687da83b002ba84829b56e55f79c378fac4876ed Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 10:59:49 +0000 Subject: [PATCH 46/61] Refactor get_regolith() to add create_vm() compatibility --- quickget | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/quickget b/quickget index 8ee11a4..3c32ca5 100755 --- a/quickget +++ b/quickget @@ -1073,23 +1073,15 @@ function get_popos() { function get_regolith() { local EDITION="${1:-}" local HASH="" - local ISO="" - local SUBDIR="" + local ISO="Regolith_${EDITION}_${RELEASE}.iso" local URL="" case ${EDITION} in - 1.6.0) SUBDIR="release-release-${RELEASE}-${RELEASE}_standard-${EDITION}";; - 2.0.0) SUBDIR="regolith-linux-2.0-${RELEASE}-latest";; + 1.6.0) URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download/release-release-${RELEASE}-${RELEASE}_standard-${EDITION}";; + 2.0.0) URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download/regolith-linux-2.0-${RELEASE}-latest";; esac - - 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}" - fi - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_rockylinux() { From 455b9e723ca7036e3d1493c12ed35a58462c6135 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:00:29 +0000 Subject: [PATCH 47/61] Refactor get_rockylinux() to add create_vm() compatibility --- quickget | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/quickget b/quickget index 3c32ca5..aec8260 100755 --- a/quickget +++ b/quickget @@ -1087,15 +1087,15 @@ function get_regolith() { function get_rockylinux() { local EDITION="${1:-}" local HASH="" - local ISO="" + local ISO="Rocky-${RELEASE}-x86_64-${EDITION}.iso" local URL="" - URL="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/x86_64" - ISO="Rocky-${RELEASE}-x86_64-${EDITION}.iso" + case ${RELEASE} in + 8.5) URL="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/x86_64";; + *) URL="http://dl.rockylinux.org/vault/rocky/${RELEASE}/isos/x86_64/";; + esac 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}" + echo "${URL}/${ISO} ${HASH}" } function get_slackware() { From 7ec075159122bc65e4f7c6547c81f9f047e2aaa6 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:01:39 +0000 Subject: [PATCH 48/61] Refactor get_slackware() to add create_vm() compatibility --- quickget | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/quickget b/quickget index aec8260..3b5bef7 100755 --- a/quickget +++ b/quickget @@ -1100,24 +1100,10 @@ function get_rockylinux() { 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 - + local ISO="slackware64-${RELEASE}-install-dvd.iso" + local URL="https://slackware.nl/slackware/slackware-iso/slackware64-${RELEASE}-iso" HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut -d' ' -f1) - web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_solus() { From fa49bf2e0db0b8f72a47df9264383dcdb1d748ea Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:03:45 +0000 Subject: [PATCH 49/61] Refactor get_solus() to add create_vm() compatibility --- quickget | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/quickget b/quickget index 3b5bef7..84fbc00 100755 --- a/quickget +++ b/quickget @@ -1109,22 +1109,11 @@ function get_slackware() { function get_solus() { local EDITION="${1:-}" local HASH="" - local ISO="" - local URL="" + local ISO="Solus-${RELEASE}-${EDITION}.iso" + local URL="https://mirrors.rit.edu/solus/images/${RELEASE}" - 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}" + HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | cut -d' ' -f1) + echo "${URL}/${ISO} ${HASH}" } function get_tails() { From ffac1da50303c773db1c27de4ffc5b88ec84d06c Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:05:55 +0000 Subject: [PATCH 50/61] Refactor get_tails() to add create_vm() compatibility --- quickget | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/quickget b/quickget index 84fbc00..42266bf 100755 --- a/quickget +++ b/quickget @@ -1118,19 +1118,14 @@ function get_solus() { function get_tails() { local ISO="" + local JSON="" local HASH="" - local RELEASE_JSON_URL="" - local RELEASE_JSON="" local URL="" - 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="${URL##*/}" - web_get "${URL}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + JSON="$(wget -q -O- "https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json")" + URL=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url') + HASH=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256') + echo "${URL} ${HASH}" } function get_ubuntu() { From 23b8e42374b217c57de8129c39a85bf041b0fd2e Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:06:33 +0000 Subject: [PATCH 51/61] Refactor get_void() to add create_vm() compatibility --- quickget | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/quickget b/quickget index 42266bf..f261740 100755 --- a/quickget +++ b/quickget @@ -1179,9 +1179,7 @@ function get_void() { 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}" + echo "${URL}/${ISO} ${HASH}" } function get_zorin() { From ddae16280f1f593707764cec3b0b499e30531915 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:06:51 +0000 Subject: [PATCH 52/61] Refactor get_zorin() to add create_vm() compatibility --- quickget | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/quickget b/quickget index f261740..b18e702 100755 --- a/quickget +++ b/quickget @@ -1184,14 +1184,13 @@ function get_void() { function get_zorin() { local EDITION="${1:-}" + local HASH="" local ISO="" local URL="" # 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}" + echo "${URL} ${HASH}" } function unattended_windows() { From 19d62c45f2b75af3631e146f25b8525e7decb193 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:18:41 +0000 Subject: [PATCH 53/61] Add editions to FreeBSD to support disc1 and dvd1. Closes #383 --- quickget | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/quickget b/quickget index b18e702..f3f6ae2 100755 --- a/quickget +++ b/quickget @@ -274,6 +274,10 @@ function releases_freebsd(){ echo 12.2 12.3 13.0 } +function editions_freebsd(){ + echo disc1 dvd1 +} + function releases_garuda() { echo 220131 } From a2db7348a0c6181bc4726aea31403995a4992b27 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:32:55 +0000 Subject: [PATCH 54/61] Add Debian netinst to the editions. Closes #381 --- quickget | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/quickget b/quickget index f3f6ae2..f380ac7 100755 --- a/quickget +++ b/quickget @@ -242,7 +242,7 @@ function releases_debian() { } function editions_debian() { - echo standard cinnamon gnome kde lxde lxqt mate xfce + echo standard cinnamon gnome kde lxde lxqt mate xfce netinst } function releases_devuan() { @@ -757,6 +757,12 @@ function get_debian() { 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 + + if [ "${EDITION}" == "netinst" ]; then + URL="$(echo "${URL}" | sed 's/-live//' | sed 's/hybrid/cd/')" + ISO="$(echo "${ISO}" | sed 's/-live//')" + fi + HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1) echo "${URL}/${ISO} ${HASH}" } From 86f3d46802c5c82ea815240575ee4f57bc9d1ba6 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:36:41 +0000 Subject: [PATCH 55/61] Use correct Slackware naming. Closes #380 --- quickget | 1 - 1 file changed, 1 deletion(-) diff --git a/quickget b/quickget index f380ac7..63a2ac9 100755 --- a/quickget +++ b/quickget @@ -54,7 +54,6 @@ function pretty_name() { popos) PRETTY_NAME="Pop!_OS";; regolith) PRETTY_NAME="Regolith Linux";; rockylinux) PRETTY_NAME="Rocky Linux";; - slackware) PRETTY_NAME="Slackware Linux";; ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";; ubuntu-kylin) PRETTY_NAME="Ubuntu Kylin";; ubuntu-mate) PRETTY_NAME="Ubuntu MATE";; From 4f201949cd8130ea5ac7082073a4128eb907078d Mon Sep 17 00:00:00 2001 From: nqvrg <66185596+nqvrg@users.noreply.github.com> Date: Wed, 23 Feb 2022 12:39:11 +0100 Subject: [PATCH 56/61] Add support for DragonFlyBSD (#378) * Add support for DragonFlyBSD * Add DragonFlyBSD to README --- README.md | 1 + quickget | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e09466a..03b17a4 100644 --- a/README.md +++ b/README.md @@ -215,6 +215,7 @@ Other Operating Systems - `cachyos` (CachyOS) - `debian` (Debian) - `devuan` (Devuan) + `dragonflybsd` (DragonFlyBSD) - `elementary` (elementary OS) - `fedora` (Fedora) - `freebsd` (FreeBSD) diff --git a/quickget b/quickget index 63a2ac9..a26fe90 100755 --- a/quickget +++ b/quickget @@ -36,6 +36,7 @@ function pretty_name() { archlinux) PRETTY_NAME="Arch Linux";; arcolinux) PRETTY_NAME="Arco Linux";; cachyos) PRETTY_NAME="CachyOS";; + dragonflybsd) PRETTY_NAME="DragonFlyBSD";; elementary) PRETTY_NAME="elementary OS";; freebsd) PRETTY_NAME="FreeBSD";; garuda) PRETTY_NAME="Garuda Linux";; @@ -161,6 +162,7 @@ function os_support() { cachyos \ debian \ devuan \ + dragonflybsd \ elementary \ fedora \ freebsd \ @@ -248,6 +250,10 @@ function releases_devuan() { echo beowulf chimaera } +function releases_dragonflybsd() { + echo 6.2.1 +} + function releases_elementary() { echo 6.1 } @@ -600,6 +606,9 @@ function make_vm_config() { IMAGE_FILE="${1}" ISO_FILE="${2}" case "${OS}" in + dragonflybsd) + GUEST="dragonflybsd" + IMAGE_TYPE="iso";; freebsd|ghostbsd) GUEST="freebsd" IMAGE_TYPE="iso";; @@ -646,7 +655,7 @@ EOF # 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}";; + dragonflybsd|haiku|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; kolibrios) echo "boot=\"legacy\"" >> "${CONF_FILE}" echo "disk_size=\"2G\"" >> "${CONF_FILE}" @@ -779,6 +788,19 @@ function get_devuan() { echo "${URL}/${ISO} ${HASH}" } +function get_dragonflybsd() { + local HASH="" + local ISO="" + local URL="" + + URL="http://mirror-master.dragonflybsd.org/iso-images" + ISO="dfly-x86_64-${RELEASE}_REL.iso" + HASH=$(wget -q -O- "${URL}/md5.txt" | grep "(${ISO})" | cut -d' ' -f4) + web_get "${URL}/${ISO}" "${VM_PATH}" + check_hash "${ISO}" "${HASH}" + make_vm_config "${ISO}" +} + function get_elementary() { local HASH="" local ISO="elementaryos-${RELEASE}-stable.20211218-rc.iso" From 5ac9a848eb3371abaa0ccae27a8874b69cd4ff31 Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:41:53 +0000 Subject: [PATCH 57/61] Refactor get_dragonflybsd() to support create_vm() --- quickget | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/quickget b/quickget index a26fe90..5289caa 100755 --- a/quickget +++ b/quickget @@ -790,15 +790,11 @@ function get_devuan() { function get_dragonflybsd() { local HASH="" - local ISO="" - local URL="" + local ISO="dfly-x86_64-${RELEASE}_REL.iso" + local URL="http://mirror-master.dragonflybsd.org/iso-images" - URL="http://mirror-master.dragonflybsd.org/iso-images" - ISO="dfly-x86_64-${RELEASE}_REL.iso" HASH=$(wget -q -O- "${URL}/md5.txt" | grep "(${ISO})" | cut -d' ' -f4) - web_get "${URL}/${ISO}" "${VM_PATH}" - check_hash "${ISO}" "${HASH}" - make_vm_config "${ISO}" + echo "${URL}/${ISO} ${HASH}" } function get_elementary() { From 480b916398b28d78e444fa445c0d60e97580ef88 Mon Sep 17 00:00:00 2001 From: nqvrg <66185596+nqvrg@users.noreply.github.com> Date: Wed, 23 Feb 2022 12:45:39 +0100 Subject: [PATCH 58/61] Add some whitespace-formatting rules (#379) * Embed whitespace rules for vim at the end of quickemu and quickget files * Add .editorconfig file with some basic whitepace rules --- .editorconfig | 12 ++++++++++++ quickemu | 2 ++ quickget | 2 ++ 3 files changed, 16 insertions(+) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..1014ba7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 2 +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false diff --git a/quickemu b/quickemu index f784cc4..1a97990 100755 --- a/quickemu +++ b/quickemu @@ -1300,3 +1300,5 @@ if [ ${SHORTCUT} -eq 1 ]; then fi vm_boot + +# vim:tabstop=2:shiftwidth=2:expandtab diff --git a/quickget b/quickget index 5289caa..e610e41 100755 --- a/quickget +++ b/quickget @@ -1731,3 +1731,5 @@ else esac exit 1 fi + +# vim:tabstop=2:shiftwidth=2:expandtab From f4701ed15465e6c724bd27104aa7d729b5a93c2a Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Wed, 23 Feb 2022 11:50:31 +0000 Subject: [PATCH 59/61] Update .editorconfig with correct spacing for quickget (4) and quickemu (2) Sorry, I managed to create these with different spacing. Something to address in the future perhaps. --- .editorconfig | 10 +++++++++- quickget | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.editorconfig b/.editorconfig index 1014ba7..9080fe7 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,6 @@ root = true -[*] +[quickemu] charset = utf-8 end_of_line = lf insert_final_newline = true @@ -8,5 +8,13 @@ indent_style = space indent_size = 2 trim_trailing_whitespace = true +[quickget] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = space +indent_size = 4 +trim_trailing_whitespace = true + [*.md] trim_trailing_whitespace = false diff --git a/quickget b/quickget index e610e41..b263894 100755 --- a/quickget +++ b/quickget @@ -1732,4 +1732,4 @@ else exit 1 fi -# vim:tabstop=2:shiftwidth=2:expandtab +# vim:tabstop=4:shiftwidth=4:expandtab From 8b86ee83da64d67730b7c9707e2fca500c5ba226 Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Wed, 23 Feb 2022 22:21:32 +0000 Subject: [PATCH 60/61] Pretty name corrections (#387) * trying to keep up... re-generating * revert README.md to upstream for noise-suppression * Changed os names also changed for PRETTY_NAMEs Fixes #386 --- quickget | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index b263894..7a4dd75 100755 --- a/quickget +++ b/quickget @@ -56,9 +56,9 @@ function pretty_name() { regolith) PRETTY_NAME="Regolith Linux";; rockylinux) PRETTY_NAME="Rocky Linux";; ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";; - ubuntu-kylin) PRETTY_NAME="Ubuntu Kylin";; + ubuntukylin) PRETTY_NAME="Ubuntu Kylin";; ubuntu-mate) PRETTY_NAME="Ubuntu MATE";; - ubuntu-studio) PRETTY_NAME="Ubuntu Studio";; + ubuntustudio) PRETTY_NAME="Ubuntu Studio";; void) PRETTY_NAME="Void Linux";; zorin) PRETTY_NAME="Zorin OS";; *) PRETTY_NAME="${SIMPLE_NAME^}";; From 22e95b4e74efdf48f3413b6f6a58232bd9fdaf3d Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Wed, 23 Feb 2022 22:21:44 +0000 Subject: [PATCH 61/61] Debian netinst nonsed (#385) * trying to keep up... re-generating * revert README.md to upstream for noise-suppression * replace the debian netinst seds per stream --- quickget | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/quickget b/quickget index 7a4dd75..43e715e 100755 --- a/quickget +++ b/quickget @@ -767,8 +767,9 @@ function get_debian() { esac if [ "${EDITION}" == "netinst" ]; then - URL="$(echo "${URL}" | sed 's/-live//' | sed 's/hybrid/cd/')" - ISO="$(echo "${ISO}" | sed 's/-live//')" + URL="${URL/-live/}" + URL="${URL/hybrid/cd}" + ISO="${ISO/-live/}" fi HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut -d' ' -f1)