From 165218ebb03e13d0699e94748c40fe3534dd62ea Mon Sep 17 00:00:00 2001 From: Phil Clifford Date: Mon, 16 Oct 2023 11:33:14 +0100 Subject: [PATCH] fix blendOS downloads again (#729) * fix blendOS downloads again * WIP tidy release/edition naming and consider showing YYMMDD date --- quickget | 48 +++++++++++++++++++++--------------------------- 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/quickget b/quickget index addf7879d4..16c314a20d 100755 --- a/quickget +++ b/quickget @@ -289,15 +289,16 @@ function releases_arosone() { } function releases_blendos() { + +# Pull the rss feed +wget -q https://sourceforge.net/projects/blendos/rss?path=/ISOs/ -O- | grep -E -o 'https://.*blendOS\.iso.*/tmp/blendos-isos.rss + local RLIST - RLIST=$(curl -s https://api.github.com/repos/blend-os/blendOS/releases |grep tag_name | grep -o -E '[[:digit:]]+\.[[:digit:]]+' | tr ' \r\n' ' ') + RLIST=$(grep -E -o 'https://.*blendOS\.iso.*&1 | grep -i Location | cut -d' ' -f4) - URL=${TMPURL%\?*} - HASH=$(curl -s https://sourceforge.net/projects/blendos/files/${RELEASE}-1/${EDITION:-GNOME}/|grep -o -E '\"sha1\":\".*\"'|cut -d\" -f4) - ;; - kde|plasma) - local ED_DE="Plasma" - TMPURL=$(wget -q -S -O- --max-redirect=0 "https://sourceforge.net/projects/blendos/files/23.04-1/${ED_DE^}/blendOS-2023.04.22-x86_64-${ED_DE,,}.iso/download" 2>&1 | grep -i Location | cut -d' ' -f4) - URL=${TMPURL%\?*} - HASH=$(curl -s https://sourceforge.net/projects/blendos/files/${RELEASE}-1/Plasma/|grep -o -E '\"sha1\":\".*\"'|cut -d\" -f4) - ;; - esac - ;; - esac - echo "${URL} ${HASH}" + + # 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}" } function get_vanillaos() {