Fix: initial correction for 23.04 moving to sourceforge

and also now having 2 editions
This commit is contained in:
Phil Clifford 2023-04-28 02:23:42 +01:00
parent 7a87d5ac7e
commit 02f0fd76fe
No known key found for this signature in database
GPG Key ID: 92F7A790E9BAF1F7

View File

@ -270,10 +270,16 @@ function editions_arcolinux() {
}
function releases_blendos() {
curl -s https://api.github.com/repos/blend-os/blendOS/releases |grep tag_name | grep -o -E '[[:digit:]]+\.[[:digit:]]+'
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' ' ')
echo ${RLIST}
}
function editions_blendos() {
echo GNOME KDE
}
function releases_cachyos() {
echo 2300305
}
@ -1016,8 +1022,37 @@ function get_arcolinux() {
function get_blendos() {
local HASH=""
local URL="$(curl -s https://api.github.com/repos/blend-os/blendOS/releases |grep 'browser_download_url'|grep ${RELEASE} | grep -o '\"http.*\.iso\"'| cut -d\" -f 2| head -1)"
HASH=$(curl -s "${URL}.sha256sum" | cut -d' ' -f1)
local URL=""
# GNOME ISO: https://sourceforge.net/projects/blendos/files/23.04-1/GNOME/blendOS-2023.04.22-x86_64-gnome.iso/download
# KDE Plasma ISO: https://sourceforge.net/projects/blendos/files/23.04-1/Plasma/blendOS-2023.04.22-x86_64-plasma.iso/download
case ${RELEASE} in
23.01)
URL="$(curl -s https://api.github.com/repos/blend-os/blendOS/releases |grep 'browser_download_url'|grep ${RELEASE} | grep -o '\"http.*\.iso\"'| cut -d\" -f 2| head -1)"
HASH=$(curl -s "${URL}.sha256sum" | cut -d' ' -f1)
;;
23.04)
case ${EDITION:-GNOME} in
#KDE} in
GNOME)
TMPURL=$(wget -q -S -O- --max-redirect=0 "https://sourceforge.net/projects/blendos/files/23.04-1/GNOME/blendOS-2023.04.22-x86_64-gnome.iso/download" 2>&1 | grep -i Location | cut -d' ' -f4)
URL=${TMPURL%\?*}
# URL=$(curl -s https://sourceforge.net/projects/blendos/files/${RELEASE}-1/${EDITION:-GNOME}/|grep -o -E '\"https:.*\.iso"'|head -n1)
HASH=$(curl -s https://sourceforge.net/projects/blendos/files/${RELEASE}-1/${EDITION:-GNOME}/|grep -o -E '\"sha1\":\".*\"'|cut -d\" -f4)
;;
KDE)
TMPURL=$(wget -q -S -O- --max-redirect=0 "https://sourceforge.net/projects/blendos/files/23.04-1/Plasma/blendOS-2023.04.22-x86_64-plasma.iso/download" 2>&1 | grep -i Location | cut -d' ' -f4)
URL=${TMPURL%\?*}
# URL=$(curl -s https://sourceforge.net/projects/blendos/files/${RELEASE}-1/${EDITION:-GNOME}/|grep -o -E '\"https:.*\.iso"'|head -n1)
HASH=$(curl -s https://sourceforge.net/projects/blendos/files/${RELEASE}-1/Plasma/|grep -o -E '\"sha1\":\".*\"'|cut -d\" -f4)
;;
esac
;;
*)
echo Unsupported Release ; exit 20
URL=$(curl -s https://sourceforge.net/projects/blendos/files/${RELEASE}-1/${EDITION:-GNOME}/|grep -o -E '\"https:.*\.iso/download\"'|head -n1 | tr -d '"' )
HASH=$(curl -s https://sourceforge.net/projects/blendos/files/${RELEASE}-1/${EDITION:-GNOME}/|grep -o -E '\"sha1\":\".*\"'|cut -d\" -f4)
;;
esac
echo "${URL} ${HASH}"
}