refactor: update freebsd to use web_pipe()

This commit is contained in:
Martin Wimpress 2024-04-19 14:20:44 +01:00 committed by Martin Wimpress
parent b5e4891d5c
commit da5f3c91d0
1 changed files with 3 additions and 3 deletions

View File

@ -2157,7 +2157,7 @@ function get_freebsd() {
local HASH="" local HASH=""
local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-${EDITION}.iso" local ISO="FreeBSD-${RELEASE}-RELEASE-amd64-${EDITION}.iso"
local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}" local URL="https://download.freebsd.org/ftp/releases/amd64/amd64/ISO-IMAGES/${RELEASE}"
HASH=$(wget -q -O- "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4) HASH=$(web_pipe "${URL}/CHECKSUM.SHA256-FreeBSD-${RELEASE}-RELEASE-amd64" | grep "${ISO}" | grep -v ".xz" | cut -d' ' -f4)
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"
} }
@ -2168,11 +2168,11 @@ function get_freedos() {
case ${RELEASE} in case ${RELEASE} in
1.2) 1.2)
ISO="FD12CD.iso" ISO="FD12CD.iso"
HASH=$(wget -q -O- "${URL}/FD12.sha" | grep "${ISO}" | cut -d' ' -f1) HASH=$(web_pipe "${URL}/FD12.sha" | grep "${ISO}" | cut_1)
;; ;;
1.3) 1.3)
ISO="FD13-LiveCD.zip" ISO="FD13-LiveCD.zip"
HASH=$(wget -q -O- "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut -d' ' -f1) HASH=$(web_pipe "${URL}/verify.txt" | grep -A 8 "sha256sum" | grep "${ISO}" | cut_1)
;; ;;
esac esac
echo "${URL}/${ISO} ${HASH}" echo "${URL}/${ISO} ${HASH}"