fix: update holoiso to only download the most recent release

- Close #1302
- Close #1301
This commit is contained in:
Martin Wimpress 2024-06-25 11:20:01 +01:00 committed by Martin Wimpress
parent 3a07d353b9
commit 130cd6a811
1 changed files with 2 additions and 1 deletions

View File

@ -831,7 +831,7 @@ function editions_haiku() {
}
function releases_holoiso() {
web_pipe "https://github.com/HoloISO/releases/releases/latest" | grep -o -e 'releases/tag/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]' | head -n 1 | cut -d'/' -f 3
echo "latest"
}
function releases_kali() {
@ -1963,6 +1963,7 @@ function get_haiku() {
function get_holoiso() {
local HASH=""
local URL=""
RELEASE="$(web_pipe "https://github.com/HoloISO/releases/releases" | grep -o -e 'releases/tag/[[:digit:]]\+\(\.[[:digit:]]\+\)*' | head -n 1 | cut -d'/' -f 3)"
URL=$(web_pipe "https://api.github.com/repos/HoloISO/releases/releases" | jq -r ".[] | select(.tag_name==\"${RELEASE}\") | .body" | sed -n 's/.*\(https:\/\/[^ ]*holoiso\.ru\.eu\.org\/[^ ]*\.iso\).*/\1/p' | head -n 1)
echo "${URL} ${HASH}"
}