refactor: update truenas-scale to use web_pipe()

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

View File

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