fix: update gnomeos to correctly resolve URLs to .iso images

This commit is contained in:
Martin Wimpress 2024-04-28 13:24:32 +01:00 committed by Martin Wimpress
parent 673c38027e
commit 7f3d15f298
1 changed files with 11 additions and 20 deletions

View File

@ -799,8 +799,7 @@ function editions_gentoo() {
} }
function releases_ghostbsd() { function releases_ghostbsd() {
web_pipe "https://download.ghostbsd.org/releases/amd64/" | grep "href" | cut -d'"' -f2 | cut -d'/' -f1 | sort -r | tail +3 | head -n 5 | tr '\n' ' ' echo $(web_pipe "https://download.ghostbsd.org/releases/amd64/" | grep "href" | cut -d'"' -f2 | cut -d'/' -f1 | sort -r | tail +3 | head -3)
echo
} }
function editions_ghostbsd() { function editions_ghostbsd() {
@ -808,9 +807,7 @@ function editions_ghostbsd() {
} }
function releases_gnomeos() { function releases_gnomeos() {
local GNOMEOS_RELEASES="" echo "nightly" $(web_pipe "https://download.gnome.org/gnomeos/" | grep -o -P '(?<=<a href=").*(?=/" title=")' | sort -nr)
GNOMEOS_RELEASES="$(web_pipe "https://download.gnome.org/gnomeos/" | grep -o -P '(?<=<a href=").*(?=/" title=")' | sort -nr | tr '\n' ' ')"
echo nightly "${GNOMEOS_RELEASES}"
} }
function releases_guix() { function releases_guix() {
@ -1896,24 +1893,18 @@ function get_ghostbsd() {
function get_gnomeos() { function get_gnomeos() {
local HASH="" local HASH=""
local ISO="" local ISO="gnome_os_installer_${RELEASE}.iso"
local URL="" local URL="https://download.gnome.org/gnomeos/${RELEASE}"
case ${RELEASE} in case ${RELEASE} in
nightly) nightly)
URL="https://os.gnome.org/download/latest" ISO="gnome_os_installer.iso"
ISO="gnome_os_installer.iso";; URL="https://os.gnome.org/download/latest";;
# The download.gnome.org mirror does not currently link to ISOs for 44.rc or 45.rc 46.0) ISO="gnome_os_installer_46.iso";;
44.rc|45.rc) 3*) ISO="gnome_os_installer.iso";;
URL="https://mirror.umd.edu/gnome/gnomeos/${RELEASE}"
ISO="gnome_os_installer_${RELEASE}.iso";;
3.38*)
URL="https://download.gnome.org/gnomeos/${RELEASE}"
ISO="gnome_os_installer.iso";;
*)
URL="https://download.gnome.org/gnomeos/${RELEASE}"
ISO="gnome_os_installer_${RELEASE}.iso";;
esac esac
echo "${URL}/${ISO} ${HASH}" # Process the URL redirections; required for GNOME
ISO=$(web_redirect "${URL}/${ISO}")
echo "${ISO} ${HASH}"
} }
function get_guix() { function get_guix() {