Fix HoloISO downloads - closes #1062

This commit is contained in:
Liam 2024-04-16 22:57:40 -07:00 committed by Martin Wimpress
parent 1ed0a4d14e
commit 6f88ffedbc
1 changed files with 4 additions and 10 deletions

View File

@ -992,7 +992,7 @@ function editions_haiku() {
} }
function releases_holoiso() { function releases_holoiso() {
wget -q https://github.com/HoloISO/holoiso/releases/latest -O- | grep -o -e 'releases/tag/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]' | head -1 | cut -d/ -f3 wget -q https://github.com/HoloISO/releases/releases/latest -O- | grep -o -e 'releases/tag/[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]' | head -1 | cut -d/ -f3
} }
function releases_kali() { function releases_kali() {
@ -1441,10 +1441,6 @@ function web_get() {
echo Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION:+ $EDITION}: ${FILE} echo Downloading $(pretty_name "${OS}") ${RELEASE} ${EDITION:+ $EDITION}: ${FILE}
fi fi
if [ "${OS}" != "macos" ]; then
USER_AGENT="InternetRecovery/1.0"
fi
if command -v curl &>/dev/null; then if command -v curl &>/dev/null; then
if ! curl --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then if ! curl --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then
echo "ERROR! Failed to download ${URL} with curl." echo "ERROR! Failed to download ${URL} with curl."
@ -2267,11 +2263,9 @@ function get_haiku() {
function get_holoiso() { function get_holoiso() {
#local HASH="" #local HASH=""
local ISO=$(wget -q -O- "https://api.github.com/repos/HoloISO/holoiso/releases" | sed 's/ /\n/g' | grep "HoloISO_${RELEASES}" | cut -d'\' -f1 | cut -d'/' -f4) local URL
local URL="https://cd2.holoiso.ru.eu.org" URL=$(wget -q -O- "https://api.github.com/repos/HoloISO/releases/releases" | jq ".[] | select(.tag_name==\"${RELEASE}\") | .body" | grep -Po "https://\S+holoiso.ru.eu.org/\S+.iso" | head -n 1)
# Can't find hash echo "${URL}"
#HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | cut -d' ' -f1)
echo "${URL}/${ISO} #${HASH}"
} }
function get_kali() { function get_kali() {