Refactor get_tails() to add create_vm() compatibility
This commit is contained in:
parent
fa49bf2e0d
commit
ffac1da503
15
quickget
15
quickget
@ -1118,19 +1118,14 @@ function get_solus() {
|
||||
|
||||
function get_tails() {
|
||||
local ISO=""
|
||||
local JSON=""
|
||||
local HASH=""
|
||||
local RELEASE_JSON_URL=""
|
||||
local RELEASE_JSON=""
|
||||
local URL=""
|
||||
|
||||
RELEASE_JSON_URL="https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json"
|
||||
RELEASE_JSON="$(wget -q -O- "${RELEASE_JSON_URL}")"
|
||||
URL=$(echo "${RELEASE_JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url')
|
||||
HASH=$(echo "${RELEASE_JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256')
|
||||
ISO="${URL##*/}"
|
||||
web_get "${URL}" "${VM_PATH}"
|
||||
check_hash "${ISO}" "${HASH}"
|
||||
make_vm_config "${ISO}"
|
||||
JSON="$(wget -q -O- "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}"
|
||||
}
|
||||
|
||||
function get_ubuntu() {
|
||||
|
Loading…
Reference in New Issue
Block a user