feat: make blendos_releases() dynamic and simplify

This commit is contained in:
Martin Wimpress 2024-04-21 09:46:59 +01:00 committed by Martin Wimpress
parent af7fe35742
commit c36497a88a
1 changed files with 5 additions and 11 deletions

View File

@ -829,14 +829,11 @@ function editions_biglinux() {
} }
function releases_blendos() { function releases_blendos() {
echo latest echo $(web_pipe "https://mirror.ico277.xyz/blendos/gnome/" | grep "\.iso" | cut -c81- | cut -d'"' -f2 | cut -d'-' -f2)
} }
function editions_blendos() { function editions_blendos() {
web_pipe "https://sourceforge.net/projects/blendos/rss?path=/ISOs/" | grep -E -o 'https://.*blendOS\.iso.*</media:hash' >/tmp/blendos-isos.rss echo $(web_pipe "https://mirror.ico277.xyz/blendos/" | grep "\[DIR\]" | cut -c81-90 | cut -d'/' -f1 | grep -v testing | sort -u)
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' ' ')"
echo "${BLENDOS_EDITIONS}"
} }
function releases_bodhi() { function releases_bodhi() {
@ -1867,12 +1864,9 @@ function get_bunsenlabs() {
function get_blendos() { function get_blendos() {
local HASH="" local HASH=""
local URL="" local ISO="blendos-${RELEASE}-stable-${EDITION}.iso"
local latest_blendos_release local URL="https://mirror.ico277.xyz/blendos/${EDITION}"
latest_blendos_release="$(grep "${EDITION}" /tmp/blendos-isos.rss | cut -d '/' -f 9 | sort -nr | head -n 1)" echo "${URL}/${ISO} ${HASH}"
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}')
echo "${URL} ${HASH}"
} }
function get_vanillaos() { function get_vanillaos() {