refactor: update bazzite to use web_pipe()

This commit is contained in:
Martin Wimpress 2024-04-19 14:14:19 +01:00 committed by Martin Wimpress
parent c0a3b0a686
commit d3676dcdb6

View File

@ -1912,8 +1912,8 @@ function get_bazzite() {
local HASH=""
local ISO=""
local URL="https://github.com/ublue-os/bazzite/releases/download/v${RELEASE}"
ISO=$(wget -q -O- "https://api.github.com/repos/ublue-os/bazzite/releases" | grep 'download_url' | grep 'sum' | cut -d '"' -f4 | cut -d'.' -f1-5 | grep "${RELEASE}" | cut -d'/' -f9)
HASH=$(wget -q -O- "${URL}/${ISO}.sha256sum" | grep 'SHA256' | cut -d' ' -f4)
ISO=$(web_pipe "https://api.github.com/repos/ublue-os/bazzite/releases" | grep 'download_url' | grep 'sum' | cut -d '"' -f4 | cut -d'.' -f1-5 | grep "${RELEASE}" | cut -d'/' -f9)
HASH=$(web_pipe "${URL}/${ISO}.sha256sum" | grep 'SHA256' | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}"
}