Consistently indent quickget with 4 spaces

This commit is contained in:
nqvrg 2022-02-24 16:06:57 +01:00
parent 2dd71036f3
commit 0d670056b6

188
quickget
View File

@ -1,4 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export LC_ALL=C export LC_ALL=C
# Here the quick 'n dirty guide to adding a new OS to quickget # Here the quick 'n dirty guide to adding a new OS to quickget
@ -30,38 +31,38 @@ function pretty_name() {
local PRETTY_NAME="" local PRETTY_NAME=""
SIMPLE_NAME="${1}" SIMPLE_NAME="${1}"
case ${SIMPLE_NAME} in case ${SIMPLE_NAME} in
alma) PRETTY_NAME="Alma Linux";; alma) PRETTY_NAME="Alma Linux" ;;
alpine) PRETTY_NAME="Alpine Linux";; alpine) PRETTY_NAME="Alpine Linux" ;;
android) PRETTY_NAME="Android x86";; android) PRETTY_NAME="Android x86" ;;
archlinux) PRETTY_NAME="Arch Linux";; archlinux) PRETTY_NAME="Arch Linux" ;;
arcolinux) PRETTY_NAME="Arco Linux";; arcolinux) PRETTY_NAME="Arco Linux" ;;
cachyos) PRETTY_NAME="CachyOS";; cachyos) PRETTY_NAME="CachyOS" ;;
dragonflybsd) PRETTY_NAME="DragonFlyBSD";; dragonflybsd) PRETTY_NAME="DragonFlyBSD" ;;
elementary) PRETTY_NAME="elementary OS";; elementary) PRETTY_NAME="elementary OS" ;;
freebsd) PRETTY_NAME="FreeBSD";; freebsd) PRETTY_NAME="FreeBSD" ;;
garuda) PRETTY_NAME="Garuda Linux";; garuda) PRETTY_NAME="Garuda Linux" ;;
ghostbsd) PRETTY_NAME="GhostBSD";; ghostbsd) PRETTY_NAME="GhostBSD" ;;
kdeneon) PRETTY_NAME="KDE Neon";; kdeneon) PRETTY_NAME="KDE Neon" ;;
kolibrios) PRETTY_NAME="KolibriOS";; kolibrios) PRETTY_NAME="KolibriOS" ;;
linuxmint) PRETTY_NAME="Linux Mint";; linuxmint) PRETTY_NAME="Linux Mint" ;;
mxlinux) PRETTY_NAME="MX Linux";; mxlinux) PRETTY_NAME="MX Linux" ;;
netboot) PRETTY_NAME="netboot.xyz";; netboot) PRETTY_NAME="netboot.xyz" ;;
netbsd) PRETTY_NAME="NetBSD";; netbsd) PRETTY_NAME="NetBSD" ;;
nixos) PRETTY_NAME="NixOS";; nixos) PRETTY_NAME="NixOS" ;;
macos) PRETTY_NAME="macOS";; macos) PRETTY_NAME="macOS" ;;
openbsd) PRETTY_NAME="OpenBSD";; openbsd) PRETTY_NAME="OpenBSD" ;;
opensuse) PRETTY_NAME="openSUSE";; opensuse) PRETTY_NAME="openSUSE" ;;
oraclelinux) PRETTY_NAME="Oracle Linux";; oraclelinux) PRETTY_NAME="Oracle Linux" ;;
popos) PRETTY_NAME="Pop!_OS";; popos) PRETTY_NAME="Pop!_OS" ;;
regolith) PRETTY_NAME="Regolith Linux";; regolith) PRETTY_NAME="Regolith Linux" ;;
rockylinux) PRETTY_NAME="Rocky Linux";; rockylinux) PRETTY_NAME="Rocky Linux" ;;
ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie";; ubuntu-budgie) PRETTY_NAME="Ubuntu Budgie" ;;
ubuntukylin) PRETTY_NAME="Ubuntu Kylin";; ubuntukylin) PRETTY_NAME="Ubuntu Kylin" ;;
ubuntu-mate) PRETTY_NAME="Ubuntu MATE";; ubuntu-mate) PRETTY_NAME="Ubuntu MATE" ;;
ubuntustudio) PRETTY_NAME="Ubuntu Studio";; ubuntustudio) PRETTY_NAME="Ubuntu Studio" ;;
void) PRETTY_NAME="Void Linux";; void) PRETTY_NAME="Void Linux" ;;
zorin) PRETTY_NAME="Zorin OS";; zorin) PRETTY_NAME="Zorin OS" ;;
*) PRETTY_NAME="${SIMPLE_NAME^}";; *) PRETTY_NAME="${SIMPLE_NAME^}" ;;
esac esac
echo "${PRETTY_NAME}" echo "${PRETTY_NAME}"
} }
@ -73,8 +74,8 @@ function validate_release() {
DISPLAY_NAME="$(pretty_name "${OS}")" DISPLAY_NAME="$(pretty_name "${OS}")"
case ${OS} in case ${OS} in
*ubuntu*) RELEASE_GENERATOR="releases_ubuntu";; *ubuntu*) RELEASE_GENERATOR="releases_ubuntu" ;;
*) RELEASE_GENERATOR="${1}";; *) RELEASE_GENERATOR="${1}" ;;
esac esac
RELEASES=$(${RELEASE_GENERATOR}) RELEASES=$(${RELEASE_GENERATOR})
@ -416,8 +417,7 @@ function releases_rockylinux() {
} }
function editions_rockylinux() { function editions_rockylinux() {
echo minimal \ echo minimal dvd1
dvd1
} }
function releases_slackware() { function releases_slackware() {
@ -453,7 +453,8 @@ function releases_windows() {
} }
function languages_windows() { function languages_windows() {
LANGS=(Arabic LANGS=(
Arabic
"Brazilian Portuguese" "Brazilian Portuguese"
Bulgarian Bulgarian
"Chinese (Simplified)" "Chinese (Simplified)"
@ -490,7 +491,8 @@ function languages_windows() {
Swedish Swedish
Thai Thai
Turkish Turkish
Ukrainian) Ukrainian
)
} }
function releases_zorin() { function releases_zorin() {
@ -510,12 +512,12 @@ function check_hash() {
# 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 ;;
40) hash_algo=sha1sum;; 40) hash_algo=sha1sum ;;
64) hash_algo=sha256sum;; 64) hash_algo=sha256sum ;;
128) hash_algo=sha512sum;; 128) hash_algo=sha512sum ;;
*) 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}... "
@ -608,31 +610,31 @@ function make_vm_config() {
case "${OS}" in case "${OS}" in
dragonflybsd) dragonflybsd)
GUEST="dragonflybsd" GUEST="dragonflybsd"
IMAGE_TYPE="iso";; IMAGE_TYPE="iso" ;;
freebsd|ghostbsd) freebsd|ghostbsd)
GUEST="freebsd" GUEST="freebsd"
IMAGE_TYPE="iso";; IMAGE_TYPE="iso" ;;
haiku) haiku)
GUEST="haiku" GUEST="haiku"
IMAGE_TYPE="iso";; IMAGE_TYPE="iso" ;;
kolibrios) kolibrios)
GUEST="kolibrios" GUEST="kolibrios"
IMAGE_TYPE="iso";; IMAGE_TYPE="iso" ;;
macos) macos)
GUEST="macos" GUEST="macos"
IMAGE_TYPE="img";; IMAGE_TYPE="img" ;;
netbsd) netbsd)
GUEST="netbsd" GUEST="netbsd"
IMAGE_TYPE="iso";; IMAGE_TYPE="iso" ;;
openbsd) openbsd)
GUEST="openbsd" GUEST="openbsd"
IMAGE_TYPE="iso";; IMAGE_TYPE="iso" ;;
windows) windows)
GUEST="windows" GUEST="windows"
IMAGE_TYPE="iso";; IMAGE_TYPE="iso" ;;
*) *)
GUEST="linux" GUEST="linux"
IMAGE_TYPE="iso";; IMAGE_TYPE="iso" ;;
esac esac
if [ -n "${EDITION}" ]; then if [ -n "${EDITION}" ]; then
@ -654,14 +656,14 @@ EOF
# OS specific tweaks # OS specific tweaks
case ${OS} in case ${OS} in
alma|oraclelinux|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}";; alma|oraclelinux|rockylinux) echo "disk_size=\"32G\"" >> "${CONF_FILE}" ;;
dragonflybsd|haiku|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}";; dragonflybsd|haiku|openbsd|netbsd|slackware|tails) echo "boot=\"legacy\"" >> "${CONF_FILE}" ;;
kolibrios) kolibrios)
echo "boot=\"legacy\"" >> "${CONF_FILE}" echo "boot=\"legacy\"" >> "${CONF_FILE}"
echo "disk_size=\"2G\"" >> "${CONF_FILE}" echo "disk_size=\"2G\"" >> "${CONF_FILE}"
echo "ram=\"128M\"" >> "${CONF_FILE}" echo "ram=\"128M\"" >> "${CONF_FILE}"
;; ;;
macos) echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}";; macos) echo "macos_release=\"${RELEASE}\"" >> "${CONF_FILE}" ;;
esac esac
# Enable TPM for Windows 11 # Enable TPM for Windows 11
@ -688,7 +690,7 @@ function get_alma() {
local HASH="" local HASH=""
local ISO="AlmaLinux-${RELEASE}-x86_64-${EDITION}.iso" local ISO="AlmaLinux-${RELEASE}-x86_64-${EDITION}.iso"
local URL="http://lon.mirror.rackspace.com/almalinux/${RELEASE}/isos/x86_64/" local URL="http://lon.mirror.rackspace.com/almalinux/${RELEASE}/isos/x86_64/"
HASH="$(wget -q -O- "${URL}/CHECKSUM" | grep "(${ISO}" | cut -d' ' -f4)" HASH=$(wget -q -O- "${URL}/CHECKSUM" | grep "(${ISO}" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -699,8 +701,8 @@ function get_alpine() {
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" ;;
esac esac
VERSION=$(wget -qO- "${URL}/latest-releases.yaml" | awk '/"Xen"/{found=0} {if(found) print} /"Virtual"/{found=1}' | grep 'version:' | awk '{print $2}') 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" ISO="alpine-virt-${VERSION}-x86_64.iso"
@ -762,8 +764,8 @@ function get_debian() {
local URL="" local URL=""
case ${RELEASE} in case ${RELEASE} in
11.2.0) URL="https://cdimage.debian.org/debian-cd/${RELEASE}-live/amd64/iso-hybrid";; 11.2.0) URL="https://cdimage.debian.org/debian-cd/${RELEASE}-live/amd64/iso-hybrid" ;;
*) URL="https://cdimage.debian.org/cdimage/archive/${RELEASE}-live/amd64/iso-hybrid/";; *) URL="https://cdimage.debian.org/cdimage/archive/${RELEASE}-live/amd64/iso-hybrid/" ;;
esac esac
if [ "${EDITION}" == "netinst" ]; then if [ "${EDITION}" == "netinst" ]; then
@ -782,8 +784,8 @@ function get_devuan() {
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.0_amd64_desktop-live.iso";; chimaera) ISO="devuan_${RELEASE}_4.0.0_amd64_desktop-live.iso" ;;
esac esac
HASH=$(wget -q -O- "${URL}/SHASUMS.txt" | grep "${ISO}" | cut -d' ' -f1) HASH=$(wget -q -O- "${URL}/SHASUMS.txt" | grep "${ISO}" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -814,8 +816,8 @@ function get_fedora() {
local VARIANT="" local VARIANT=""
case ${EDITION} in case ${EDITION} in
Server|Silverblue|Workstation) VARIANT="${EDITION}";; Server|Silverblue|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}"'")')
@ -840,8 +842,8 @@ function get_garuda() {
local URL="" local URL=""
case ${EDITION} in case ${EDITION} in
cinnamon|mate) URL="http://mirrors.fossho.st/garuda/iso/community/${EDITION}/${RELEASE}";; cinnamon|mate) URL="http://mirrors.fossho.st/garuda/iso/community/${EDITION}/${RELEASE}" ;;
*) URL="http://mirrors.fossho.st/garuda/iso/garuda/${EDITION}/${RELEASE}";; *) URL="http://mirrors.fossho.st/garuda/iso/garuda/${EDITION}/${RELEASE}" ;;
esac esac
ISO="garuda-${EDITION}-linux-zen-${RELEASE}.iso" ISO="garuda-${EDITION}-linux-zen-${RELEASE}.iso"
HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)" HASH="$(wget -q -O- "${URL}/${ISO}.sha256" | cut -d' ' -f1)"
@ -865,8 +867,8 @@ function get_ghostbsd() {
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" ;;
esac esac
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}"
@ -928,22 +930,22 @@ function get_macos() {
case ${RELEASE} in case ${RELEASE} in
high-sierra) high-sierra)
BOARD_ID="Mac-7BA5B2D9E42DDD94" BOARD_ID="Mac-7BA5B2D9E42DDD94"
MLB="00000000000J80300";; MLB="00000000000J80300" ;;
mojave) mojave)
BOARD_ID="Mac-7BA5B2DFE22DDD8C" BOARD_ID="Mac-7BA5B2DFE22DDD8C"
MLB="00000000000KXPG00";; MLB="00000000000KXPG00" ;;
catalina) catalina)
BOARD_ID="Mac-CFF7D910A743CAAF" BOARD_ID="Mac-CFF7D910A743CAAF"
MLB="00000000000PHCD00";; MLB="00000000000PHCD00" ;;
big-sur) big-sur)
BOARD_ID="Mac-35C1E88140C3E6CF" BOARD_ID="Mac-35C1E88140C3E6CF"
MLB="00000000000000000";; MLB="00000000000000000" ;;
monterey) monterey)
BOARD_ID="Mac-06F11F11946D27C5" BOARD_ID="Mac-06F11F11946D27C5"
MLB="00000000000000000";; MLB="00000000000000000" ;;
*) echo "ERROR! Unknown release: ${RELEASE}" *) echo "ERROR! Unknown release: ${RELEASE}"
releases_macos releases_macos
exit 1;; exit 1 ;;
esac esac
# Use a bundled macrecovery if possible # Use a bundled macrecovery if possible
@ -994,8 +996,8 @@ function get_manjaro() {
local URL="" local URL=""
case ${RELEASE} in case ${RELEASE} in
gnome|kde|xfce) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/official/${RELEASE}.md";; 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";; budgie|cinnamon|deepin|i3|mate) MANIFESTURL="https://gitlab.manjaro.org/webpage/manjaro-homepage/-/raw/master/site/content/downloads/community/${RELEASE}.md" ;;
esac esac
URL="$(wget -qO- "${MANIFESTURL}" | grep "Download_x64 =" | cut -d'"' -f2)" URL="$(wget -qO- "${MANIFESTURL}" | grep "Download_x64 =" | cut -d'"' -f2)"
@ -1010,9 +1012,9 @@ function get_mxlinux() {
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" ;;
Fluxbox) ISO="MX-${RELEASE}_fluxbox_x64.iso";; Fluxbox) ISO="MX-${RELEASE}_fluxbox_x64.iso" ;;
esac esac
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}"
@ -1081,8 +1083,8 @@ function get_oraclelinux() {
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
8) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-x86_64-dvd.iso";; 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";; *) ISO="OracleLinux-R${VER_MAJ}-U${VER_MIN}-Server-x86_64-dvd.iso" ;;
esac 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) 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)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -1105,8 +1107,8 @@ function get_regolith() {
local URL="" local URL=""
case ${EDITION} in case ${EDITION} in
1.6.0) URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download/release-release-${RELEASE}-${RELEASE}_standard-${EDITION}";; 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";; 2.0.0) URL="https://github.com/regolith-linux/regolith-ubuntu-iso-builder/releases/download/regolith-linux-2.0-${RELEASE}-latest" ;;
esac esac
HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1) HASH=$(wget -q -O- "${URL}/SHA256SUMS" | cut -d' ' -f1)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -1119,8 +1121,8 @@ function get_rockylinux() {
local URL="" local URL=""
case ${RELEASE} in case ${RELEASE} in
8.5) URL="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/x86_64";; 8.5) URL="https://download.rockylinux.org/pub/rocky/${RELEASE}/isos/x86_64" ;;
*) URL="http://dl.rockylinux.org/vault/rocky/${RELEASE}/isos/x86_64/";; *) URL="http://dl.rockylinux.org/vault/rocky/${RELEASE}/isos/x86_64/" ;;
esac esac
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}"
@ -1201,10 +1203,10 @@ function get_void() {
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}.iso";; glibc) ISO="void-live-x86_64-${DATE}.iso" ;;
musl) ISO="void-live-x86_64-musl-${DATE}.iso";; musl) ISO="void-live-x86_64-musl-${DATE}.iso" ;;
xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";; xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso" ;;
xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";; xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso" ;;
esac esac
HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)" HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)"
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
@ -1540,8 +1542,8 @@ function get_windows() {
# Ignore the most recent Windows 10 release for now. # Ignore the most recent Windows 10 release for now.
case ${RELEASE} in case ${RELEASE} in
10) INDEX=0;; 10) INDEX=0 ;;
11) INDEX=0;; 11) INDEX=0 ;;
esac esac
echo "Getting Windows ${RELEASE} URL..." echo "Getting Windows ${RELEASE} URL..."
@ -1555,8 +1557,8 @@ function get_windows() {
dbg_windows "${VERSION_ID}" dbg_windows "${VERSION_ID}"
case ${RELEASE} in case ${RELEASE} in
8) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 8.1 Pro + Core").edition_id');; 8) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows 8.1 Pro + Core").edition_id') ;;
10|11) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows '"${RELEASE}"'").edition_id');; 10|11) EDITION_ID=$(wget -q -O- "https://tb.rg-adguard.net/php/get_edition.php?version_id=${VERSION_ID}&lang=name_${LANG_CODE}" | jq -r '.editions[] | select(.name_'${LANG_CODE}'=="Windows '"${RELEASE}"'").edition_id') ;;
esac esac
dbg_windows "${EDITION_ID}" dbg_windows "${EDITION_ID}"