refactor: update void to use web_pipe()

This commit is contained in:
Martin Wimpress 2024-04-19 22:48:38 +01:00 committed by Martin Wimpress
parent 234cf563d5
commit 729729fd6d
1 changed files with 2 additions and 2 deletions

View File

@ -2947,14 +2947,14 @@ function get_void() {
local HASH="" local HASH=""
local ISO="" local ISO=""
local URL="https://repo-default.voidlinux.org/live/current" local URL="https://repo-default.voidlinux.org/live/current"
DATE=$(wget -q -O- "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4) DATE=$(web_pipe "${URL}/sha256sum.txt" | head -n1 | cut -d'.' -f1 | cut -d'-' -f4)
case ${EDITION} in case ${EDITION} in
glibc) ISO="void-live-x86_64-${DATE}-base.iso";; glibc) ISO="void-live-x86_64-${DATE}-base.iso";;
musl) ISO="void-live-x86_64-musl-${DATE}-base.iso";; musl) ISO="void-live-x86_64-musl-${DATE}-base.iso";;
xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";; xfce-glibc) ISO="void-live-x86_64-${DATE}-xfce.iso";;
xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";; xfce-musl) ISO="void-live-x86_64-musl-${DATE}-xfce.iso";;
esac esac
HASH="$(wget -q -O- "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)" HASH="$(web_pipe "${URL}/sha256sum.txt" | grep "${ISO}" | cut -d' ' -f4)"
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }