refactor: update tails to use web_pipe()

This commit is contained in:
Martin Wimpress 2024-04-19 22:22:37 +01:00 committed by Martin Wimpress
parent 2274d3d923
commit 866fed32c7
1 changed files with 1 additions and 2 deletions

View File

@ -2790,11 +2790,10 @@ function get_spirallinux() {
}
function get_tails() {
local ISO=""
local JSON=""
local HASH=""
local URL=""
JSON="$(wget -q -O- "https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json")"
JSON="$(web_pipe "https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json")"
URL=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url')
HASH=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256')
echo "${URL} ${HASH}"