Use only latest BlendOS release

This commit is contained in:
Liam 2024-04-13 19:51:10 -07:00 committed by Martin Wimpress
parent bea27b1ffa
commit 592271d46b
1 changed files with 15 additions and 21 deletions

View File

@ -527,13 +527,15 @@ function releases_biglinux() {
}
function releases_blendos() {
# Pull the rss feed
echo latest
}
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
local RLIST
RLIST=$(grep -E -o 'https://.*blendOS\.iso.*</media:hash' /tmp/blendos-isos.rss | cut -d/ -f 8-9 | sort -r -t/ --key=2 |grep -e '16878' -e '168[8-9]'| tr '\r\n' ' ')
echo "${RLIST}"
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_bunsenlabs() {
@ -1568,23 +1570,15 @@ function get_biglinux() {
}
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}')
# BlendOS has more editions and releases but there's a tracker indirect and other issues
# so easier to use the rss feed
#
# We have to provide edition/release as RELEASE or have a major refactor
# But this works for now ... or does it ....
URL=$(grep ${RELEASE} /tmp/blendos-isos.rss | grep -E -o 'https://.*blendOS\.iso')
HASH=$(grep ${RELEASE} /tmp/blendos-isos.rss | grep -E -o '[[:alnum:]]{32}')
# ## fix up variables for path naming
EDITION=${RELEASE%%/*}
RELEASE=${RELEASE##*/}
# For UX maybe show the date of the release
#echo ${RELEASE##*/} "(" $(date -d @${RELEASE##*/}) ")"
# maybe $(date -d @${RELEASE##*/} '+%Y%m%d')
echo "${URL} ${HASH}"
}