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

View File

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