Refactor get_tails() to add create_vm() compatibility

pull/388/head
Martin Wimpress 3 years ago
parent fa49bf2e0d
commit ffac1da503
No known key found for this signature in database
GPG Key ID: 61DF940515E06DA3
  1. 15
      quickget

@ -1118,19 +1118,14 @@ function get_solus() {
function get_tails() { function get_tails() {
local ISO="" local ISO=""
local JSON=""
local HASH="" local HASH=""
local RELEASE_JSON_URL=""
local RELEASE_JSON=""
local URL="" local URL=""
RELEASE_JSON_URL="https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json" JSON="$(wget -q -O- "https://tails.boum.org/install/v2/Tails/amd64/${RELEASE}/latest.json")"
RELEASE_JSON="$(wget -q -O- "${RELEASE_JSON_URL}")" URL=$(echo "${JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].url')
URL=$(echo "${RELEASE_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')
HASH=$(echo "${RELEASE_JSON}" | jq -r '.installations[0]."installation-paths"[]|select(.type=="iso")|."target-files"[0].sha256') echo "${URL} ${HASH}"
ISO="${URL##*/}"
web_get "${URL}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
} }
function get_ubuntu() { function get_ubuntu() {

Loading…
Cancel
Save