style: Remove 100+ empty lines which don't significantly improve readibility (#1066)

(In my opinion)
This commit is contained in:
zenobit 2024-04-17 16:12:35 +02:00 committed by GitHub
parent ce39944f43
commit e1952d7e56
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 123 deletions

127
quickget
View File

@ -371,7 +371,6 @@ list_supported() {
local FUNC local FUNC
local OPTION local OPTION
local OS local OS
for OS in $(os_support); do for OS in $(os_support); do
case ${OS} in case ${OS} in
*ubuntu-server*) FUNC="ubuntu-server";; *ubuntu-server*) FUNC="ubuntu-server";;
@ -404,7 +403,6 @@ list_isos() {
local FUNC local FUNC
local OPTION local OPTION
local OS local OS
for OS in $(os_support); do for OS in $(os_support); do
case ${OS} in case ${OS} in
*ubuntu-server*) FUNC="ubuntu-server";; *ubuntu-server*) FUNC="ubuntu-server";;
@ -458,11 +456,13 @@ test_isos() {
for OS in $(os_support); do for OS in $(os_support); do
local GOOD="" local GOOD=""
case "${OS}" in case "${OS}" in
*ubuntu-server*) FUNC="ubuntu-server";; *ubuntu-server*) FUNC="ubuntu-server";;
*ubuntu*) FUNC="ubuntu";; *ubuntu*) FUNC="ubuntu";;
*) FUNC="${OS}";; *) FUNC="${OS}";;
esac esac
for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases for RELEASE in $("releases_${FUNC}" | sed -Ee 's/eol-\S+//g' ); do # hide eol releases
if [[ $(type -t "editions_${OS}") == function ]]; then if [[ $(type -t "editions_${OS}") == function ]]; then
for OPTION in $(editions_"${OS}"); do for OPTION in $(editions_"${OS}"); do
@ -820,7 +820,6 @@ function releases_blendos() {
function editions_blendos() { function editions_blendos() {
wget -q https://sourceforge.net/projects/blendos/rss?path=/ISOs/ -O- | grep -E -o 'https://.*blendOS\.iso.*</media:hash' >/tmp/blendos-isos.rss wget -q https://sourceforge.net/projects/blendos/rss?path=/ISOs/ -O- | grep -E -o 'https://.*blendOS\.iso.*</media:hash' >/tmp/blendos-isos.rss
local BLENDOS_EDITIONS local BLENDOS_EDITIONS
BLENDOS_EDITIONS="$(grep -E -o 'https://.*blendOS\.iso.*</media:hash' /tmp/blendos-isos.rss | cut -d '/' -f 8 | sort | uniq | tr '\n' ' ')" BLENDOS_EDITIONS="$(grep -E -o 'https://.*blendOS\.iso.*</media:hash' /tmp/blendos-isos.rss | cut -d '/' -f 8 | sort | uniq | tr '\n' ' ')"
echo "${BLENDOS_EDITIONS}" echo "${BLENDOS_EDITIONS}"
@ -1269,7 +1268,6 @@ function releases_ubuntu() {
local EOL_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Obsolete") | .version' <<<${VERSION_DATA} | sort)) local EOL_VERSIONS=($(IFS=$'\n' jq -r 'select(.status=="Obsolete") | .version' <<<${VERSION_DATA} | sort))
local LTS_SUPPORT=() local LTS_SUPPORT=()
local INTERIM_SUPPORT=() local INTERIM_SUPPORT=()
for i in "${SUPPORTED_VERSIONS[@]}"; do for i in "${SUPPORTED_VERSIONS[@]}"; do
if [[ $(expr ${i%.*} % 2) == 0 && ${i#*.} == "04" ]]; then if [[ $(expr ${i%.*} % 2) == 0 && ${i#*.} == "04" ]]; then
LTS_SUPPORT+=($i) LTS_SUPPORT+=($i)
@ -1277,7 +1275,6 @@ function releases_ubuntu() {
INTERIM_SUPPORT+=($i) INTERIM_SUPPORT+=($i)
fi fi
done done
case "${OS}" in case "${OS}" in
edubuntu|ubuntu-unity|ubuntucinnamon) edubuntu|ubuntu-unity|ubuntucinnamon)
echo ${INTERIM_SUPPORT[@]} daily-live echo ${INTERIM_SUPPORT[@]} daily-live
@ -1298,10 +1295,8 @@ function releases_ubuntu() {
function releases_ubuntu-server() { function releases_ubuntu-server() {
local ALL_VERSIONS=($(IFS=$'\n' wget -qO- http://releases.ubuntu.com/streams/v1/com.ubuntu.releases:ubuntu-server.json | jq -r '.products[] | select(.arch=="amd64") | .version')) local ALL_VERSIONS=($(IFS=$'\n' wget -qO- http://releases.ubuntu.com/streams/v1/com.ubuntu.releases:ubuntu-server.json | jq -r '.products[] | select(.arch=="amd64") | .version'))
local LTS_SUPPORT=() local LTS_SUPPORT=()
local INTERIM_SUPPORT=() local INTERIM_SUPPORT=()
for i in "${!ALL_VERSIONS[@]}"; do for i in "${!ALL_VERSIONS[@]}"; do
if [[ $i == 0 || ${ALL_VERSIONS[$i]} > ${ALL_VERSIONS[$(expr $i - 1)]} ]]; then if [[ $i == 0 || ${ALL_VERSIONS[$i]} > ${ALL_VERSIONS[$(expr $i - 1)]} ]]; then
if [[ $(expr ${ALL_VERSIONS[${i}]%.*} % 2) == 0 && ${ALL_VERSIONS[${i}]#*.} == "04" ]]; then if [[ $(expr ${ALL_VERSIONS[${i}]%.*} % 2) == 0 && ${ALL_VERSIONS[${i}]#*.} == "04" ]]; then
@ -1313,7 +1308,6 @@ function releases_ubuntu-server() {
break break
fi fi
done done
echo ${LTS_SUPPORT[@]} ${INTERIM_SUPPORT[@]} daily-live echo ${LTS_SUPPORT[@]} ${INTERIM_SUPPORT[@]} daily-live
} }
@ -1384,7 +1378,6 @@ function check_hash() {
iso="${VM_PATH}/${1}" iso="${VM_PATH}/${1}"
fi fi
hash="${2}" hash="${2}"
# Guess the hash algorithm by the hash length # Guess the hash algorithm by the hash length
case ${#hash} in case ${#hash} in
32) hash_algo=md5sum;; 32) hash_algo=md5sum;;
@ -1394,7 +1387,6 @@ function check_hash() {
*) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash." *) echo "WARNING! Can't guess hash algorithm, not checking ${iso} hash."
return;; return;;
esac esac
echo -n "Checking ${iso} with ${hash_algo}... " echo -n "Checking ${iso} with ${hash_algo}... "
if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then if ! echo "${hash} ${iso}" | ${hash_algo} --check --status; then
echo "ERROR!" echo "ERROR!"
@ -1425,7 +1417,6 @@ function web_get() {
shift shift
fi fi
done done
# Test mode for ISO # Test mode for ISO
if [ "${show_iso_url}" == 'on' ]; then if [ "${show_iso_url}" == 'on' ]; then
echo "${URL}" echo "${URL}"
@ -1470,7 +1461,6 @@ function zsync_get() {
local FILE="${1##*/}" local FILE="${1##*/}"
local OUT="" local OUT=""
local URL="${1}" local URL="${1}"
# Test mode for ISO # Test mode for ISO
if [ "${show_iso_url}" == 'on' ]; then if [ "${show_iso_url}" == 'on' ]; then
echo "${URL}" echo "${URL}"
@ -1489,7 +1479,6 @@ function zsync_get() {
echo "ERROR! Unable to create directory ${DIR}" echo "ERROR! Unable to create directory ${DIR}"
exit 1 exit 1
fi fi
echo -e Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION+ ${EDITION}} from ${URL}'\n' echo -e Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION+ ${EDITION}} from ${URL}'\n'
# Only force http for zsync - not earlier because we might fall through here # Only force http for zsync - not earlier because we might fall through here
if ! zsync "${URL/https/http}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then if ! zsync "${URL/https/http}.zsync" -i "${DIR}/${OUT}" -o "${DIR}/${OUT}" 2>/dev/null; then
@ -1517,11 +1506,9 @@ function make_vm_config() {
local IMAGE_TYPE="" local IMAGE_TYPE=""
local GUEST="" local GUEST=""
local SEC_BOOT="" local SEC_BOOT=""
if [ "${download_iso}" == "on" ]; then if [ "${download_iso}" == "on" ]; then
exit 0 exit 0
fi fi
IMAGE_FILE="${1}" IMAGE_FILE="${1}"
ISO_FILE="${2}" ISO_FILE="${2}"
case "${OS}" in case "${OS}" in
@ -1684,11 +1671,13 @@ EOF
fi fi
echo echo
echo "To start your $(pretty_name "${OS}") virtual machine run:" echo "To start your $(pretty_name "${OS}") virtual machine run:"
if [ ${OS} == "slint" ]; then if [ ${OS} == "slint" ]; then
echo -e " quickemu --vm ${CONF_FILE}\nTo start Slint with braille support run:\n quickemu --vm --braille --display sdl ${CONF_FILE}" echo -e " quickemu --vm ${CONF_FILE}\nTo start Slint with braille support run:\n quickemu --vm --braille --display sdl ${CONF_FILE}"
else else
echo " quickemu --vm ${CONF_FILE}" echo " quickemu --vm ${CONF_FILE}"
fi fi
echo echo
exit 0 exit 0
} }
@ -1707,7 +1696,6 @@ function get_alpine() {
local ISO="" local ISO=""
local URL="" local URL=""
local VERSION="" local VERSION=""
case ${RELEASE} in case ${RELEASE} in
latest) URL="https://dl-cdn.alpinelinux.org/alpine/latest-stable/releases/x86_64";; 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";; *) URL="https://dl-cdn.alpinelinux.org/alpine/v${RELEASE}/releases/x86_64";;
@ -1725,7 +1713,6 @@ function get_android() {
local JSON_ALL="" local JSON_ALL=""
local JSON_REL="" local JSON_REL=""
local URL="https://mirrors.gigenet.com/OSDN/android-x86" 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_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"))))') 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) ISO=$(echo "${JSON_REL}" | jq -r .n)
@ -1745,12 +1732,10 @@ function get_antix() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://sourceforge.net/projects/antix-linux/files/Final/antiX-${RELEASE}" local URL="https://sourceforge.net/projects/antix-linux/files/Final/antiX-${RELEASE}"
case ${RELEASE} in case ${RELEASE} in
21) URL_runit="${URL}/runit-bullseye";; 21) URL_runit="${URL}/runit-bullseye";;
*) URL_runit="${URL}/runit-antiX-${RELEASE}";; *) URL_runit="${URL}/runit-antiX-${RELEASE}";;
esac esac
case ${EDITION} in case ${EDITION} in
net-sysv) ISO="antiX-${RELEASE}-net_x64-net.iso";; net-sysv) ISO="antiX-${RELEASE}-net_x64-net.iso";;
core-sysv) ISO="antiX-${RELEASE}_x64-core.iso";; core-sysv) ISO="antiX-${RELEASE}_x64-core.iso";;
@ -1769,7 +1754,6 @@ function get_antix() {
URL="${URL_runit}" URL="${URL_runit}"
;; ;;
esac esac
HASH=$(wget -q -O- ${URL}/README.txt | grep "${ISO}" | cut -d' ' -f1 | head -1) HASH=$(wget -q -O- ${URL}/README.txt | grep "${ISO}" | cut -d' ' -f1 | head -1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -1787,7 +1771,6 @@ function get_archcraft() {
local HASH="" local HASH=""
local URL="" local URL=""
local TMPURL="" local TMPURL=""
# Check where the URL redirects using curl. Output to a nonexistent directory so it's not possible to successfully download the image # Check where the URL redirects using curl. Output to a nonexistent directory so it's not possible to successfully download the image
URL=$(curl -Lfs "https://sourceforge.net/projects/archcraft/files/latest/download" -w %{url_effective} -o /this/is/a/nonexistent/directory/$RANDOM/$RANDOM) URL=$(curl -Lfs "https://sourceforge.net/projects/archcraft/files/latest/download" -w %{url_effective} -o /this/is/a/nonexistent/directory/$RANDOM/$RANDOM)
echo "${URL} ${HASH}" echo "${URL} ${HASH}"
@ -1859,12 +1842,9 @@ function get_blendos() {
local HASH="" local HASH=""
local URL="" local URL=""
local latest_blendos_release local latest_blendos_release
latest_blendos_release="$(grep "${EDITION}" /tmp/blendos-isos.rss | cut -d '/' -f 9 | sort -nr | head -n 1)" latest_blendos_release="$(grep "${EDITION}" /tmp/blendos-isos.rss | cut -d '/' -f 9 | sort -nr | head -n 1)"
URL=$(grep "${EDITION}/${latest_blendos_release}" /tmp/blendos-isos.rss | grep -E -o 'https://.*blendOS\.iso') URL=$(grep "${EDITION}/${latest_blendos_release}" /tmp/blendos-isos.rss | grep -E -o 'https://.*blendOS\.iso')
HASH=$(grep "${EDITION}/${latest_blendos_release}" /tmp/blendos-isos.rss | grep -E -o '[[:alnum:]]{32}') HASH=$(grep "${EDITION}/${latest_blendos_release}" /tmp/blendos-isos.rss | grep -E -o '[[:alnum:]]{32}')
echo "${URL} ${HASH}" echo "${URL} ${HASH}"
} }
@ -1890,7 +1870,6 @@ function get_bazzite() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://github.com/ublue-os/bazzite/releases/download/v${RELEASE}" local URL="https://github.com/ublue-os/bazzite/releases/download/v${RELEASE}"
ISO=$(wget -q -O- "https://api.github.com/repos/ublue-os/bazzite/releases" | grep 'download_url' | grep 'sum' | cut -d '"' -f4 | cut -d'.' -f1-5 | grep "${RELEASE}" | cut -d'/' -f9) ISO=$(wget -q -O- "https://api.github.com/repos/ublue-os/bazzite/releases" | grep 'download_url' | grep 'sum' | cut -d '"' -f4 | cut -d'.' -f1-5 | grep "${RELEASE}" | cut -d'/' -f9)
HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | grep 'SHA256' | cut -d' ' -f4) HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | grep 'SHA256' | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -1901,7 +1880,6 @@ function get_bodhi() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://sourceforge.net/projects/bodhilinux/files/${RELEASE}" local URL="https://sourceforge.net/projects/bodhilinux/files/${RELEASE}"
case ${EDITION} in case ${EDITION} in
standard) ISO="bodhi-${RELEASE}-64.iso";; standard) ISO="bodhi-${RELEASE}-64.iso";;
*) ISO="bodhi-${RELEASE}-64-${EDITION}.iso";; *) ISO="bodhi-${RELEASE}-64-${EDITION}.iso";;
@ -1915,7 +1893,6 @@ function get_cachyos() {
local ISO="" local ISO=""
local URL="" local URL=""
local release="" local release=""
release=$(curl "https://mirror.cachyos.org/ISO/${EDITION}/" | grep -Po '(?<=">)[0-9]+(?=/</a>)' | tail -n 1) release=$(curl "https://mirror.cachyos.org/ISO/${EDITION}/" | grep -Po '(?<=">)[0-9]+(?=/</a>)' | tail -n 1)
ISO="cachyos-${EDITION}-linux-${release}.iso" ISO="cachyos-${EDITION}-linux-${release}.iso"
URL="https://mirror.cachyos.org/ISO/${EDITION}/${release}" URL="https://mirror.cachyos.org/ISO/${EDITION}/${release}"
@ -1960,9 +1937,7 @@ function get_crunchbang++() {
local URL="" local URL=""
local URLPART="" local URLPART=""
local URLPART2="" local URLPART2=""
URLPART="https://github.com/CBPP/cbpp" URLPART="https://github.com/CBPP/cbpp"
case ${RELEASE} in case ${RELEASE} in
8) 8)
URLPART2="releases/download/v1.0-amd64" URLPART2="releases/download/v1.0-amd64"
@ -1985,7 +1960,6 @@ function get_crunchbang++() {
ISO="cbpp-12.0-amd64-20230611.iso" ISO="cbpp-12.0-amd64-20230611.iso"
;; ;;
esac esac
URL="${URLPART}/${URLPART2}" URL="${URLPART}/${URLPART2}"
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -1995,19 +1969,16 @@ function get_debian() {
local HASH="" local HASH=""
local ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso" local ISO="debian-live-${RELEASE}-amd64-${EDITION}.iso"
local URL="" local URL=""
DEBCURRENT=$(wget -q https://cdimage.debian.org/debian-cd/ -O- |grep '\.[0-9]/'|cut -d\> -f9|cut -d\/ -f1) DEBCURRENT=$(wget -q https://cdimage.debian.org/debian-cd/ -O- |grep '\.[0-9]/'|cut -d\> -f9|cut -d\/ -f1)
case ${RELEASE} in case ${RELEASE} in
"${DEBCURRENT}") URL="https://cdimage.debian.org/debian-cd/${RELEASE}-live/amd64/iso-hybrid";; "${DEBCURRENT}") 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 esac
if [ "${EDITION}" == "netinst" ]; then if [ "${EDITION}" == "netinst" ]; then
URL="${URL/-live/}" URL="${URL/-live/}"
URL="${URL/hybrid/cd}" URL="${URL/hybrid/cd}"
ISO="${ISO/-live/}" ISO="${ISO/-live/}"
fi fi
HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut_1) HASH=$(wget -q -O- "${URL}/SHA512SUMS" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2018,7 +1989,6 @@ function get_deepin() {
local ISO="deepin-desktop-community-${RELEASE}-amd64.iso" local ISO="deepin-desktop-community-${RELEASE}-amd64.iso"
# deepin-desktop-community-20.3-amd64.iso # deepin-desktop-community-20.3-amd64.iso
local URL="https://cdimage.deepin.com/releases/"${RELEASE} local URL="https://cdimage.deepin.com/releases/"${RELEASE}
# fix iso name # fix iso name
if [[ "${RELEASE}" == *"20" ]] ; then if [[ "${RELEASE}" == *"20" ]] ; then
EDITION="1003" EDITION="1003"
@ -2027,8 +1997,6 @@ function get_deepin() {
EDITION="1010" EDITION="1010"
ISO="deepin-desktop-community-${EDITION}-amd64.iso" ISO="deepin-desktop-community-${EDITION}-amd64.iso"
fi fi
HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep "${ISO}" | cut_1) HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep "${ISO}" | cut_1)
#echo "${URL}/${ISO} ${HASH}" #echo "${URL}/${ISO} ${HASH}"
web_get "${URL}/${ISO}" "${VM_PATH}" web_get "${URL}/${ISO}" "${VM_PATH}"
@ -2040,7 +2008,6 @@ function get_devuan() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://files.devuan.org/devuan_${RELEASE}/desktop-live" local URL="https://files.devuan.org/devuan_${RELEASE}/desktop-live"
case ${RELEASE} in case ${RELEASE} in
beowulf) ISO="devuan_${RELEASE}_3.1.1_amd64_desktop-live.iso";; beowulf) ISO="devuan_${RELEASE}_3.1.1_amd64_desktop-live.iso";;
chimaera) ISO="devuan_${RELEASE}_4.0.2_amd64_desktop-live.iso";; chimaera) ISO="devuan_${RELEASE}_4.0.2_amd64_desktop-live.iso";;
@ -2054,7 +2021,6 @@ function get_dragonflybsd() {
local HASH="" local HASH=""
local ISO="dfly-x86_64-${RELEASE}_REL.iso.bz2" local ISO="dfly-x86_64-${RELEASE}_REL.iso.bz2"
local URL="http://mirror-master.dragonflybsd.org/iso-images" local URL="http://mirror-master.dragonflybsd.org/iso-images"
HASH=$(wget -q -O- "${URL}/md5.txt" | grep "(${ISO})" | cut -d' ' -f4) HASH=$(wget -q -O- "${URL}/md5.txt" | grep "(${ISO})" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2064,7 +2030,6 @@ function get_easyos() {
local URL="" local URL=""
local ISO="" local ISO=""
local YEAR="" local YEAR=""
ISO="easy-${RELEASE}-amd64.img" ISO="easy-${RELEASE}-amd64.img"
case ${RELEASE} in case ${RELEASE} in
5.6.5|5.6.4|5.6.3|5.6.2|5.6.1|5.5.5|5.5.4) 5.6.5|5.6.4|5.6.3|5.6.2|5.6.1|5.5.5|5.5.4)
@ -2073,7 +2038,6 @@ function get_easyos() {
YEAR="2024";; YEAR="2024";;
esac esac
URL="https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/${YEAR}/${RELEASE}" URL="https://distro.ibiblio.org/easyos/amd64/releases/kirkstone/${YEAR}/${RELEASE}"
HASH=$(wget -q -O- "${URL}/md5.sum.txt" | cut -d' ' -f1) HASH=$(wget -q -O- "${URL}/md5.sum.txt" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2099,7 +2063,6 @@ function get_endeavouros() {
# Find EndeavourOS releases from mirror, pick one matching release # Find EndeavourOS releases from mirror, pick one matching release
local ENDEAVOUR_RELEASES="$(curl -s "${URL}"/ | grep -o -P '(?<=<a href=").*(?=.iso">)' | grep -v 'x86_64')" local ENDEAVOUR_RELEASES="$(curl -s "${URL}"/ | grep -o -P '(?<=<a href=").*(?=.iso">)' | grep -v 'x86_64')"
local ISO="$(echo "${ENDEAVOUR_RELEASES}" | grep -i ${RELEASE}).iso" local ISO="$(echo "${ENDEAVOUR_RELEASES}" | grep -i ${RELEASE}).iso"
HASH=$(wget -q -O- "${URL}/${ISO}.sha512sum" | cut -d' ' -f1) HASH=$(wget -q -O- "${URL}/${ISO}.sha512sum" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2125,10 +2088,8 @@ function get_endless() {
pt_BR) pt_BR)
FILE_TS="230127-220328";; FILE_TS="230127-220328";;
esac esac
URL="https://images-dl.endlessm.com/release/${RELEASE}/eos-amd64-amd64/${EDITION}" URL="https://images-dl.endlessm.com/release/${RELEASE}/eos-amd64-amd64/${EDITION}"
ISO="eos-eos${RELEASE:0:3}-amd64-amd64.${FILE_TS}.${EDITION}.iso" ISO="eos-eos${RELEASE:0:3}-amd64-amd64.${FILE_TS}.${EDITION}.iso"
echo "${URL}/${ISO}" echo "${URL}/${ISO}"
} }
@ -2139,12 +2100,10 @@ function get_fedora() {
local JSON="" local JSON=""
local URL="" local URL=""
local VARIANT="" local VARIANT=""
case ${EDITION} in case ${EDITION} in
Server|Kinoite|Onyx|Silverblue|Sericea|Workstation) VARIANT="${EDITION}";; Server|Kinoite|Onyx|Silverblue|Sericea|Workstation) VARIANT="${EDITION}";;
*) VARIANT="Spins";; *) VARIANT="Spins";;
esac esac
JSON=$(wget -q -O- "https://getfedora.org/releases.json" | jq '.[] | select(.variant=="'${VARIANT}'" and .subvariant=="'"${EDITION}"'" and .arch=="x86_64" and .version=="'"${RELEASE}"'")') 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) URL=$(echo "${JSON}" | jq -r '.link' | head -n1)
HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1) HASH=$(echo "${JSON}" | jq -r '.sha256' | head -n1)
@ -2156,7 +2115,6 @@ function get_freebsd() {
local HASH="" local HASH=""
local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-${EDITION}.iso" local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-${EDITION}.iso"
local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}" local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}"
HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4) HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2165,7 +2123,6 @@ function get_freedos() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/${RELEASE}/official" local URL="http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/${RELEASE}/official"
case ${RELEASE} in case ${RELEASE} in
1.2) 1.2)
ISO="FD12CD.iso" ISO="FD12CD.iso"
@ -2176,7 +2133,6 @@ function get_freedos() {
HASH=$(wget -q -O- "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut -d' ' -f1) HASH=$(wget -q -O- "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut -d' ' -f1)
;; ;;
esac esac
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2185,9 +2141,7 @@ function get_garuda() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://iso.builds.garudalinux.org/iso/latest/garuda" local URL="https://iso.builds.garudalinux.org/iso/latest/garuda"
ISO=${EDITION}/latest.iso ISO=${EDITION}/latest.iso
HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut_1)" HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut_1)"
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2196,7 +2150,6 @@ function get_gentoo() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://mirror.bytemark.co.uk/gentoo/releases/amd64/autobuilds/" local URL="https://mirror.bytemark.co.uk/gentoo/releases/amd64/autobuilds/"
case ${EDITION} in case ${EDITION} in
minimal) ISO=$(wget -q -O- "${URL}/${RELEASE}-iso.txt" | grep install | cut -d' ' -f1) minimal) ISO=$(wget -q -O- "${URL}/${RELEASE}-iso.txt" | grep install | cut -d' ' -f1)
HASH=$( wget -q -O- "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut -d' ' -f1);; HASH=$( wget -q -O- "${URL}/${ISO}.DIGESTS" | grep -A 1 SHA512 | grep iso | grep -v CONTENTS | cut -d' ' -f1);;
@ -2211,7 +2164,6 @@ function get_ghostbsd() {
local ISO="" local ISO=""
local URL="https://download.ghostbsd.org/releases/amd64/${RELEASE}" local URL="https://download.ghostbsd.org/releases/amd64/${RELEASE}"
local HASH="" local HASH=""
case ${EDITION} in case ${EDITION} in
mate) ISO="GhostBSD-${RELEASE}.iso";; mate) ISO="GhostBSD-${RELEASE}.iso";;
xfce) ISO="GhostBSD-${RELEASE}-XFCE.iso";; xfce) ISO="GhostBSD-${RELEASE}-XFCE.iso";;
@ -2224,7 +2176,6 @@ function get_gnomeos() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL=""
case ${RELEASE} in case ${RELEASE} in
nightly) nightly)
URL="https://os.gnome.org/download/latest" URL="https://os.gnome.org/download/latest"
@ -2240,7 +2191,6 @@ function get_gnomeos() {
URL="https://download.gnome.org/gnomeos/${RELEASE}" URL="https://download.gnome.org/gnomeos/${RELEASE}"
ISO="gnome_os_installer_${RELEASE}.iso";; ISO="gnome_os_installer_${RELEASE}.iso";;
esac esac
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2249,7 +2199,6 @@ function get_guix() {
#local ISO="guix-system-vm-image-1.4.0.x86_64-linux.qcow2" #local ISO="guix-system-vm-image-1.4.0.x86_64-linux.qcow2"
local ISO="guix-system-install-1.4.0.x86_64-linux.iso" local ISO="guix-system-install-1.4.0.x86_64-linux.iso"
local URL="https://ftpmirror.gnu.org/gnu/guix" local URL="https://ftpmirror.gnu.org/gnu/guix"
#HASH=$(wget -q -O- "${URL}/${ISO}.sig") #HASH=$(wget -q -O- "${URL}/${ISO}.sig")
echo "${URL}/${ISO}" #${HASH}" echo "${URL}/${ISO}" #${HASH}"
} }
@ -2261,7 +2210,6 @@ function get_haiku() {
local URL="http://mirror.rit.edu/haiku/${RELEASE}" # NY, USA local URL="http://mirror.rit.edu/haiku/${RELEASE}" # NY, USA
# local URL="https://mirrors.tnonline.net/haiku/haiku-release/${RELEASE}" # Sweden # local URL="https://mirrors.tnonline.net/haiku/haiku-release/${RELEASE}" # Sweden
# local URL="https://mirror.aarnet.edu.au/pub/haiku/${RELEASE}" # Aus # local URL="https://mirror.aarnet.edu.au/pub/haiku/${RELEASE}" # Aus
HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4) HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | grep "${ISO}" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2277,7 +2225,6 @@ function get_kali() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://cdimage.kali.org/${RELEASE}" local URL="https://cdimage.kali.org/${RELEASE}"
ISO=$(wget -q -O- "${URL}/?C=M;O=D" | grep -o ">kali-linux-.*-installer-amd64.iso" | head -n 1 | cut -c 2-) 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_1) HASH=$(wget -q -O- "${URL}/SHA256SUMS" | grep -v torrent | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -2287,7 +2234,6 @@ function get_kdeneon() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://files.kde.org/neon/images/${RELEASE}/current" local URL="https://files.kde.org/neon/images/${RELEASE}/current"
ISO=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f3-) ISO=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut -d' ' -f3-)
HASH=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut_1) HASH=$(wget -q -O- "${URL}/neon-${RELEASE}-current.sha256sum" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -2304,7 +2250,6 @@ function get_linuxlite() {
local HASH="" local HASH=""
local ISO="linux-lite-${RELEASE}-64bit.iso" local ISO="linux-lite-${RELEASE}-64bit.iso"
local URL="https://sourceforge.net/projects/linux-lite/files/${RELEASE}" local URL="https://sourceforge.net/projects/linux-lite/files/${RELEASE}"
HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut_1) HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2314,7 +2259,6 @@ function get_linuxmint() {
local HASH="" local HASH=""
local ISO="linuxmint-${RELEASE}-${EDITION}-64bit.iso" local ISO="linuxmint-${RELEASE}-${EDITION}-64bit.iso"
local URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}" local URL="https://mirror.bytemark.co.uk/linuxmint/stable/${RELEASE}"
HASH=$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut_1) HASH=$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2324,7 +2268,6 @@ function get_lmde() {
local HASH="" local HASH=""
local ISO="lmde-${RELEASE}-${EDITION}-64bit.iso" local ISO="lmde-${RELEASE}-${EDITION}-64bit.iso"
local URL="https://mirror.bytemark.co.uk/linuxmint/debian" local URL="https://mirror.bytemark.co.uk/linuxmint/debian"
HASH=$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut_1) HASH=$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2479,23 +2422,18 @@ function get_manjaro() {
local MANIFEST="" local MANIFEST=""
local URL="" local URL=""
local TYPE="" local TYPE=""
case ${RELEASE} in case ${RELEASE} in
sway) MANIFEST="$( wget -qO- https://mirror.manjaro-sway.download/manjaro-sway/release.json )";; sway) MANIFEST="$( wget -qO- https://mirror.manjaro-sway.download/manjaro-sway/release.json )";;
gnome|xfce|plasma) TYPE="official";; gnome|xfce|plasma) TYPE="official";;
*) TYPE="community";; *) TYPE="community";;
esac esac
[[ ${RELEASE} != "sway" ]] && MANIFEST="$(wget -qO- https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)" [[ ${RELEASE} != "sway" ]] && MANIFEST="$(wget -qO- https://gitlab.manjaro.org/web/iso-info/-/raw/master/file-info.json)"
[[ ${EDITION} == "minimal" && ${TYPE} != "sway" ]] && EDITION=".minimal" || EDITION="" [[ ${EDITION} == "minimal" && ${TYPE} != "sway" ]] && EDITION=".minimal" || EDITION=""
if [[ ${RELEASE} != "sway" ]]; then if [[ ${RELEASE} != "sway" ]]; then
URL="$(echo ${MANIFEST} | jq -r .${TYPE}.${RELEASE}${EDITION}.image)" URL="$(echo ${MANIFEST} | jq -r .${TYPE}.${RELEASE}${EDITION}.image)"
else else
URL=$(echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url') URL=$(echo ${MANIFEST} | jq -r '.[] | select(.name|test("^manjaro-sway-.*[.]iso$")) | select(.name|contains("unstable")|not) | .url')
fi fi
HASH=$(wget -qO- "${URL}.sha512" | cut_1) HASH=$(wget -qO- "${URL}.sha512" | cut_1)
echo "${URL} ${HASH}" echo "${URL} ${HASH}"
} }
@ -2505,7 +2443,6 @@ function get_mxlinux() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://sourceforge.net/projects/mx-linux/files/Final/${EDITION}" local URL="https://sourceforge.net/projects/mx-linux/files/Final/${EDITION}"
case ${EDITION} in case ${EDITION} in
Xfce) ISO="MX-${RELEASE}_x64.iso";; Xfce) ISO="MX-${RELEASE}_x64.iso";;
KDE) ISO="MX-${RELEASE}_KDE_x64.iso";; KDE) ISO="MX-${RELEASE}_KDE_x64.iso";;
@ -2536,7 +2473,6 @@ function get_nitrux() {
local URLBASE="" local URLBASE=""
local URL="" local URL=""
local ISO="" local ISO=""
URLBASE="https://sourceforge.net/projects/nitruxos/files/Release" URLBASE="https://sourceforge.net/projects/nitruxos/files/Release"
URL="${URLBASE}/ISO" URL="${URLBASE}/ISO"
ISO=$(wget -qO- 'https://sourceforge.net/projects/nitruxos/rss?path=/Release/ISO' | grep '.iso' | head -1 | cut -d']' -f1 | cut -d '/' -f4) ISO=$(wget -qO- 'https://sourceforge.net/projects/nitruxos/rss?path=/Release/ISO' | grep '.iso' | head -1 | cut -d']' -f1 | cut -d '/' -f4)
@ -2574,7 +2510,6 @@ function get_opensuse() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL=""
if [ "${RELEASE}" == "tumbleweed" ]; then if [ "${RELEASE}" == "tumbleweed" ]; then
ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso" ISO="openSUSE-Tumbleweed-DVD-x86_64-Current.iso"
URL="https://download.opensuse.org/tumbleweed/iso" URL="https://download.opensuse.org/tumbleweed/iso"
@ -2598,7 +2533,6 @@ function get_oraclelinux() {
local VER_MAJ=${RELEASE::1} local VER_MAJ=${RELEASE::1}
local VER_MIN=${RELEASE:2:1} local VER_MIN=${RELEASE:2:1}
local URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/" local URL="https://yum.oracle.com/ISOS/OracleLinux/OL${VER_MAJ}/u${VER_MIN}/x86_64/"
case ${VER_MAJ} in case ${VER_MAJ} in
7) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso";; 7) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso";;
*) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso";; *) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso";;
@ -2612,7 +2546,6 @@ function get_parrotsec() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL=""
ISO="Parrot-${EDITION}-${RELEASE}_amd64.iso" ISO="Parrot-${EDITION}-${RELEASE}_amd64.iso"
URL="https://download.parrot.sh/parrot/iso/${RELEASE}" URL="https://download.parrot.sh/parrot/iso/${RELEASE}"
HASH="$(wget -q -O- ${URL}/signed-hashes.txt | grep ${ISO} | cut -d' ' -f1)" HASH="$(wget -q -O- ${URL}/signed-hashes.txt | grep ${ISO} | cut -d' ' -f1)"
@ -2624,7 +2557,6 @@ function get_peppermint() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://sourceforge.net/projects/peppermintos/files/isos" local URL="https://sourceforge.net/projects/peppermintos/files/isos"
case ${EDITION} in case ${EDITION} in
devuan-xfce) ISO="PeppermintOS-devuan_64_xfce.iso" devuan-xfce) ISO="PeppermintOS-devuan_64_xfce.iso"
URL="${URL}/XFCE" URL="${URL}/XFCE"
@ -2639,7 +2571,6 @@ function get_peppermint() {
URL="${URL}/Gnome_FlashBack" URL="${URL}/Gnome_FlashBack"
;; ;;
esac esac
HASH=$(wget -q -O- "${URL}/${ISO}-sha512.checksum" | grep "${ISO}" | cut_1) HASH=$(wget -q -O- "${URL}/${ISO}-sha512.checksum" | grep "${ISO}" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2659,7 +2590,6 @@ function get_porteus() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL=""
edition="${EDITION~~}" edition="${EDITION~~}"
ISO="Porteus-${edition}-v${RELEASE}-x86_64.iso" ISO="Porteus-${edition}-v${RELEASE}-x86_64.iso"
URL="https://mirrors.dotsrc.org/porteus/x86_64/Porteus-v${RELEASE}" URL="https://mirrors.dotsrc.org/porteus/x86_64/Porteus-v${RELEASE}"
@ -2696,7 +2626,6 @@ function get_pureos() {
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
function get_reactos() { function get_reactos() {
local HASH="" local HASH=""
local URL="" local URL=""
@ -2713,7 +2642,6 @@ function get_rockylinux() {
local HASH="" local HASH=""
local ISO="Rocky-${RELEASE}-x86_64-${EDITION}.iso" local ISO="Rocky-${RELEASE}-x86_64-${EDITION}.iso"
local URL="" local URL=""
URL="http://dl.rockylinux.org/vault/rocky/${RELEASE}/isos/x86_64" URL="http://dl.rockylinux.org/vault/rocky/${RELEASE}/isos/x86_64"
HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO})" | cut -d' ' -f4) HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "SHA256" | grep "${ISO})" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -2760,11 +2688,9 @@ function get_slint() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL=""
# Change to latest if needed # Change to latest if needed
ISO="slint64-15.0-5.iso" ISO="slint64-15.0-5.iso"
URL="https://slackware.uk/slint/x86_64/slint-${RELEASE}/iso" URL="https://slackware.uk/slint/x86_64/slint-${RELEASE}/iso"
HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f4) HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f4)
echo "${URL}/${ISO}" "${HASH}" echo "${URL}/${ISO}" "${HASH}"
} }
@ -2773,12 +2699,10 @@ function get_slitaz() {
local HASH="" local HASH=""
local ISO="slitaz-rolling-${RELEASE}" local ISO="slitaz-rolling-${RELEASE}"
local URL="http://mirror.slitaz.org/iso/rolling" local URL="http://mirror.slitaz.org/iso/rolling"
case ${RELEASE} in case ${RELEASE} in
preferred) ISO="slitaz-rolling";; preferred) ISO="slitaz-rolling";;
*) ISO="slitaz-rolling-${RELEASE}";; *) ISO="slitaz-rolling-${RELEASE}";;
esac esac
HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut_1) HASH=$(wget -q -O- "${URL}/${ISO}.md5" | cut_1)
echo "${URL}/${ISO}.iso ${HASH}" echo "${URL}/${ISO}.iso ${HASH}"
} }
@ -2788,7 +2712,6 @@ function get_solus() {
local HASH="" local HASH=""
local ISO="Solus-${RELEASE}-${EDITION}.iso" local ISO="Solus-${RELEASE}-${EDITION}.iso"
local URL="https://mirrors.rit.edu/solus/images/${RELEASE}" local URL="https://mirrors.rit.edu/solus/images/${RELEASE}"
HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | cut_1) HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2798,14 +2721,12 @@ function get_sparkylinux() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL=""
ISO="sparkylinux-${RELEASE}-x86_64-${EDITION}.iso" ISO="sparkylinux-${RELEASE}-x86_64-${EDITION}.iso"
case ${EDITION} in case ${EDITION} in
minimalcli) URL="https://sourceforge.net/projects/sparkylinux/files/cli";; minimalcli) URL="https://sourceforge.net/projects/sparkylinux/files/cli";;
minimalgui) URL="https://sourceforge.net/projects/sparkylinux/files/base";; minimalgui) URL="https://sourceforge.net/projects/sparkylinux/files/base";;
*) URL="https://sourceforge.net/projects/sparkylinux/files/${EDITION}";; *) URL="https://sourceforge.net/projects/sparkylinux/files/${EDITION}";;
esac esac
HASH=$(wget -q -O- "${URL}/${ISO}.allsums.txt" | head -2 | grep 'iso' | cut_1) HASH=$(wget -q -O- "${URL}/${ISO}.allsums.txt" | head -2 | grep 'iso' | cut_1)
echo "${URL}/${ISO}" "${HASH}" echo "${URL}/${ISO}" "${HASH}"
} }
@ -2815,7 +2736,6 @@ function get_spirallinux() {
local HASH="" local HASH=""
local ISO="SpiralLinux_${EDITION}_12.231005_x86-64.iso" local ISO="SpiralLinux_${EDITION}_12.231005_x86-64.iso"
local URL="https://sourceforge.net/projects/spirallinux/files/12.231005" local URL="https://sourceforge.net/projects/spirallinux/files/12.231005"
HASH=$(wget -q -O- 'https://sourceforge.net/projects/spirallinux/rss?path=/' | grep "${ISO}" | grep 'md5' | cut -d'<' -f3 | cut -d'>' -f2) HASH=$(wget -q -O- 'https://sourceforge.net/projects/spirallinux/rss?path=/' | grep "${ISO}" | grep 'md5' | cut -d'<' -f3 | cut -d'>' -f2)
echo "${URL}/${ISO}" "${HASH}" echo "${URL}/${ISO}" "${HASH}"
} }
@ -2825,7 +2745,6 @@ function get_tails() {
local JSON="" local JSON=""
local HASH="" local HASH=""
local URL="" local URL=""
JSON="$(wget -q -O- "https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json")" 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') 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') HASH=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256')
@ -2836,13 +2755,11 @@ function get_tinycore() {
local HASH="" local HASH=""
local ISO="${EDITION}-${RELEASE}.iso" local ISO="${EDITION}-${RELEASE}.iso"
local URL="" local URL=""
if [ "${EDITION}" == "Core" ] || [ "${EDITION}" == "TinyCore" ] || [ "${EDITION}" == "CorePlus" ]; then if [ "${EDITION}" == "Core" ] || [ "${EDITION}" == "TinyCore" ] || [ "${EDITION}" == "CorePlus" ]; then
URL="http://www.tinycorelinux.net/14.x/x86/release" URL="http://www.tinycorelinux.net/14.x/x86/release"
elif [ "${EDITION}" == "CorePure64" ] || [ "${EDITION}" == "TinyCorePure64" ]; then elif [ "${EDITION}" == "CorePure64" ] || [ "${EDITION}" == "TinyCorePure64" ]; then
URL="http://www.tinycorelinux.net/14.x/x86_64/release" URL="http://www.tinycorelinux.net/14.x/x86_64/release"
fi fi
HASH=$(wget -q -O- "${URL}/${ISO}.md5.txt" | cut_1) HASH=$(wget -q -O- "${URL}/${ISO}.md5.txt" | cut_1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2852,7 +2769,6 @@ function get_trisquel() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://mirrors.ocf.berkeley.edu/trisquel-images" local URL="https://mirrors.ocf.berkeley.edu/trisquel-images"
case ${EDITION} in case ${EDITION} in
mate) ISO="trisquel_${RELEASE}_amd64.iso";; mate) ISO="trisquel_${RELEASE}_amd64.iso";;
lxde) ISO="trisquel-mini_${RELEASE}_amd64.iso";; lxde) ISO="trisquel-mini_${RELEASE}_amd64.iso";;
@ -2866,11 +2782,8 @@ function get_trisquel() {
function get_truenas-scale() { function get_truenas-scale() {
local ISO="" local ISO=""
local URL="" local URL=""
local DLINFO="https://www.truenas.com/download-truenas-scale/" local DLINFO="https://www.truenas.com/download-truenas-scale/"
URL=$(wget -q ${DLINFO} -O- | grep -o "\"https://.*${RELEASE}.*\.iso\""|cut -d\" -f2) URL=$(wget -q ${DLINFO} -O- | grep -o "\"https://.*${RELEASE}.*\.iso\""|cut -d\" -f2)
HASH=$(wget -q "${URL}.sha256" -O- | cut_1 ) HASH=$(wget -q "${URL}.sha256" -O- | cut_1 )
echo "${URL} ${HASH}" echo "${URL} ${HASH}"
} }
@ -2878,16 +2791,13 @@ function get_truenas-scale() {
function get_truenas-core() { function get_truenas-core() {
local ISO="" local ISO=""
local URL="" local URL=""
local DLINFO="https://www.truenas.com/download-truenas-core/" local DLINFO="https://www.truenas.com/download-truenas-core/"
URL=$(wget -q ${DLINFO} -O- | grep -o "\"https://.*${RELEASE}.*\.iso\""|cut -d\" -f2) URL=$(wget -q ${DLINFO} -O- | grep -o "\"https://.*${RELEASE}.*\.iso\""|cut -d\" -f2)
HASH=$(wget -q "${URL}".sha256 -O- | cut_1) HASH=$(wget -q "${URL}".sha256 -O- | cut_1)
echo "${URL} ${HASH}" echo "${URL} ${HASH}"
} }
function get_tuxedo-os() { function get_tuxedo-os() {
local ISO="" local ISO=""
local URL="" local URL=""
local Current= local Current=
@ -2898,19 +2808,15 @@ function get_tuxedo-os() {
} }
function get_ubuntu-server() { function get_ubuntu-server() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL=""
[[ $RELEASE = daily ]] && RELEASE=daily-live [[ $RELEASE = daily ]] && RELEASE=daily-live
if [[ "${RELEASE}" == "daily"* ]]; then if [[ "${RELEASE}" == "daily"* ]]; then
URL="https://cdimage.ubuntu.com/${OS}/${RELEASE}/current" URL="https://cdimage.ubuntu.com/${OS}/${RELEASE}/current"
else else
URL="https://releases.ubuntu.com/${RELEASE}" URL="https://releases.ubuntu.com/${RELEASE}"
fi fi
if wget -q --spider "${URL}/SHA256SUMS"; then if wget -q --spider "${URL}/SHA256SUMS"; then
DATA=$(wget -qO- "${URL}/SHA256SUMS" | grep 'live-server' | grep amd64 | grep iso) DATA=$(wget -qO- "${URL}/SHA256SUMS" | grep 'live-server' | grep amd64 | grep iso)
ISO=$(cut -d'*' -f2 <<<${DATA}) ISO=$(cut -d'*' -f2 <<<${DATA})
@ -2920,12 +2826,10 @@ function get_ubuntu-server() {
ISO=$(cut -d' ' -f3 <<<${DATA}) ISO=$(cut -d' ' -f3 <<<${DATA})
HASH=$(cut -d' ' -f1 <<<${DATA}) HASH=$(cut -d' ' -f1 <<<${DATA})
fi fi
if [ -z $ISO ] || [ -z $HASH ]; then if [ -z $ISO ] || [ -z $HASH ]; then
echo "$(pretty_name $OS) ${RELEASE} is currently unavailable. Please select other OS/Release combination" echo "$(pretty_name $OS) ${RELEASE} is currently unavailable. Please select other OS/Release combination"
exit 1 exit 1
fi fi
if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso" zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso"
make_vm_config "${OS}-devel.iso" make_vm_config "${OS}-devel.iso"
@ -2941,14 +2845,11 @@ function get_ubuntu() {
local HASH="" local HASH=""
local URL="" local URL=""
local DATA="" local DATA=""
[[ $RELEASE = daily ]] && RELEASE=daily-live [[ $RELEASE = daily ]] && RELEASE=daily-live
if [[ "${RELEASE}" == "daily"* ]] && [ "${OS}" == "ubuntustudio" ]; then if [[ "${RELEASE}" == "daily"* ]] && [ "${OS}" == "ubuntustudio" ]; then
# Ubuntu Studio daily-live images are in the dvd directory # Ubuntu Studio daily-live images are in the dvd directory
RELEASE="dvd" RELEASE="dvd"
fi fi
if [[ "${RELEASE}" == "eol-"* ]]; then if [[ "${RELEASE}" == "eol-"* ]]; then
URL="https://old-releases.ubuntu.com/releases/${RELEASE/eol-/}" URL="https://old-releases.ubuntu.com/releases/${RELEASE/eol-/}"
elif [[ "${RELEASE}" == "jammy-daily" ]]; then elif [[ "${RELEASE}" == "jammy-daily" ]]; then
@ -2966,7 +2867,6 @@ function get_ubuntu() {
else else
URL="https://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release" URL="https://cdimage.ubuntu.com/${OS}/releases/${RELEASE}/release"
fi fi
if wget -q --spider "${URL}/SHA256SUMS"; then if wget -q --spider "${URL}/SHA256SUMS"; then
DATA=$(wget -qO- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac") DATA=$(wget -qO- "${URL}/SHA256SUMS" | grep 'desktop\|dvd\|install' | grep amd64 | grep iso | grep -v "+mac")
ISO=$(cut -d'*' -f2 <<<${DATA} | sed '1q;d') ISO=$(cut -d'*' -f2 <<<${DATA} | sed '1q;d')
@ -2976,12 +2876,10 @@ function get_ubuntu() {
ISO=$(cut -d'*' -f2 <<<${DATA}) ISO=$(cut -d'*' -f2 <<<${DATA})
HASH=$(cut -d' ' -f1 <<<${DATA}) HASH=$(cut -d' ' -f1 <<<${DATA})
fi fi
if [ -z $ISO ] || [ -z $HASH ]; then if [ -z $ISO ] || [ -z $HASH ]; then
echo "$(pretty_name $OS) ${RELEASE} is currently unavailable. Please select other OS/Release combination" echo "$(pretty_name $OS) ${RELEASE} is currently unavailable. Please select other OS/Release combination"
exit 1 exit 1
fi fi
if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then if [[ "${RELEASE}" == "daily"* ]] || [ "${RELEASE}" == "dvd" ]; then
zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso" zsync_get "${URL}/${ISO}" "${VM_PATH}" "${OS}-devel.iso"
make_vm_config "${OS}-devel.iso" make_vm_config "${OS}-devel.iso"
@ -3001,7 +2899,6 @@ function get_void() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://repo-default.voidlinux.org/live/current" local URL="https://repo-default.voidlinux.org/live/current"
DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4) DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4)
case ${EDITION} in case ${EDITION} in
glibc) ISO="void-live-x86_64-${DATE}-base.iso";; glibc) ISO="void-live-x86_64-${DATE}-base.iso";;
@ -3017,7 +2914,6 @@ function get_vxlinux() {
local HASH="" local HASH=""
local ISO="vx-${RELEASE}.iso" local ISO="vx-${RELEASE}.iso"
local URL="https://github.com/VX-Linux/main/releases/download/${RELEASE}" local URL="https://github.com/VX-Linux/main/releases/download/${RELEASE}"
HASH=$(wget -q -O- "${URL}/vx-${RELEASE}.md5" | cut -d' ' -f1) HASH=$(wget -q -O- "${URL}/vx-${RELEASE}.md5" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -3027,7 +2923,6 @@ function get_xerolinux() {
local URL="" local URL=""
local ISO="xerolinux-2022.12-x86_64.iso" local ISO="xerolinux-2022.12-x86_64.iso"
local URL="https://sourceforge.net/projects/xerolinux/files/Releases" local URL="https://sourceforge.net/projects/xerolinux/files/Releases"
HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1) HASH=$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -3037,7 +2932,6 @@ function get_zorin() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="" local URL=""
URL=$(curl -Lfs "https://zrn.co/${RELEASE}${EDITION}" -w %{url_effective} -o /this/is/a/nonexistent/directory/$RANDOM/$RANDOM) URL=$(curl -Lfs "https://zrn.co/${RELEASE}${EDITION}" -w %{url_effective} -o /this/is/a/nonexistent/directory/$RANDOM/$RANDOM)
echo "${URL} ${HASH}" echo "${URL} ${HASH}"
} }
@ -3329,9 +3223,7 @@ EOF
handle_curl_error() { handle_curl_error() {
local error_code="$1" local error_code="$1"
local fatal_error_action=2 local fatal_error_action=2
case "$error_code" in case "$error_code" in
6) 6)
echo "Failed to resolve Microsoft servers! Is there an Internet connection? Exiting..." echo "Failed to resolve Microsoft servers! Is there an Internet connection? Exiting..."
@ -3389,7 +3281,6 @@ handle_curl_error() {
;; ;;
esac esac
esac esac
return 1 return 1
} }
@ -3712,12 +3603,10 @@ create_vm() {
local URL="${URL_HASH[0]}" local URL="${URL_HASH[0]}"
local HASH="${URL_HASH[1]}" local HASH="${URL_HASH[1]}"
local ISO="${URL##*/}" local ISO="${URL##*/}"
#echo "${URL}" #echo "${URL}"
#echo "${ISO}" #echo "${ISO}"
#echo "${HASH}" #echo "${HASH}"
web_get "${URL}" "${VM_PATH}" web_get "${URL}" "${VM_PATH}"
if [ -n "${HASH}" ]; then if [ -n "${HASH}" ]; then
check_hash "${ISO}" "${HASH}" check_hash "${ISO}" "${HASH}"
fi fi
@ -3726,16 +3615,13 @@ create_vm() {
unzip ${VM_PATH}/${ISO} -d ${VM_PATH} unzip ${VM_PATH}/${ISO} -d ${VM_PATH}
ISO=$(ls ${VM_PATH} | grep -i '.iso') ISO=$(ls ${VM_PATH} | grep -i '.iso')
fi fi
#if [ ${OS} == "guix" ] && [[ $ISO =~ ".qcow2" ]]; then #if [ ${OS} == "guix" ] && [[ $ISO =~ ".qcow2" ]]; then
#cp ${VM_PATH}/${ISO} ${VM_PATH}/disc.qcow2 #cp ${VM_PATH}/${ISO} ${VM_PATH}/disc.qcow2
#fi #fi
if [[ ${OS} == "batocera" ]] && [[ ${ISO} =~ ".gz" ]]; then if [[ ${OS} == "batocera" ]] && [[ ${ISO} =~ ".gz" ]]; then
gzip -d "${VM_PATH}/${ISO}" gzip -d "${VM_PATH}/${ISO}"
ISO="${ISO/.gz/}" ISO="${ISO/.gz/}"
fi fi
# Could be other OS iso files compressed with bzip2 or gzip # Could be other OS iso files compressed with bzip2 or gzip
# but for now we'll keep this to know cases # but for now we'll keep this to know cases
if [[ ${OS} == "dragonflybsd" ]] && [[ ${ISO} =~ ".bz2" ]]; then if [[ ${OS} == "dragonflybsd" ]] && [[ ${ISO} =~ ".bz2" ]]; then
@ -3752,7 +3638,6 @@ create_vm() {
unzip ${VM_PATH}/${ISO} -d ${VM_PATH} unzip ${VM_PATH}/${ISO} -d ${VM_PATH}
ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip') ISO=$(ls ${VM_PATH} | grep -i '.iso' | grep -v '.zip')
fi fi
make_vm_config "${ISO}" make_vm_config "${ISO}"
} }
@ -3811,7 +3696,6 @@ handle_missing() {
exit 1; exit 1;
fi fi
fi fi
# Handle missing Manjaro Sway minimal # Handle missing Manjaro Sway minimal
if [[ $OS == manjaro ]] ; then if [[ $OS == manjaro ]] ; then
if [[ ${RELEASE} == "sway" && ${EDITION} == "minimal" ]] ; then if [[ ${RELEASE} == "sway" && ${EDITION} == "minimal" ]] ; then
@ -3955,7 +3839,6 @@ supported Operating Systems:\n' "$(quickemu --version)" "$(qemu-x86_64 -version
if [ -n "${2}" ]; then if [ -n "${2}" ]; then
RELEASE="${2,,}" RELEASE="${2,,}"
VM_PATH="${OS}-${RELEASE}" VM_PATH="${OS}-${RELEASE}"
# If the OS has an editions_() function, use it. # If the OS has an editions_() function, use it.
if [[ $(type -t "editions_${OS}") == function ]]; then if [[ $(type -t "editions_${OS}") == function ]]; then
validate_release "releases_${OS}" validate_release "releases_${OS}"
@ -3967,9 +3850,7 @@ if [ -n "${2}" ]; then
else else
os_error_edition os_error_edition
fi fi
handle_missing handle_missing
VM_PATH="${OS}-${RELEASE}-${EDITION}" VM_PATH="${OS}-${RELEASE}-${EDITION}"
create_vm "$("get_${OS}" "${EDITION}")" create_vm "$("get_${OS}" "${EDITION}")"
elif [ "${OS}" == "macos" ]; then elif [ "${OS}" == "macos" ]; then