refactor: update truenas-core to use web_pipe()

This commit is contained in:
Martin Wimpress 2024-04-19 22:45:02 +01:00 committed by Martin Wimpress
parent 5cb6baa439
commit c98cd172a5
1 changed files with 2 additions and 2 deletions

View File

@ -2840,8 +2840,8 @@ function get_truenas-core() {
local ISO="" local ISO=""
local URL="" local URL=""
local DLINFO="https://www.truenas.com/download-truenas-core/" local DLINFO="https://www.truenas.com/download-truenas-core/"
URL=$(wget -q ${DLINFO} -O- | grep -o "\"https://.*${RELEASE}.*\.iso\""|cut -d\" -f2) URL=$(web_pipe ${DLINFO} | grep -o "\"https://.*${RELEASE}.*\.iso\"" | cut -d'"' -f 2)
HASH=$(wget -q "${URL}".sha256 -O- | cut_1) HASH=$(web_pipe "${URL}".sha256 | cut_1)
echo "${URL} ${HASH}" echo "${URL} ${HASH}"
} }