Skip to content

Commit

Permalink
Merge remote-tracking branch 'sebcode/task/add-tails-linux-support' i…
Browse files Browse the repository at this point in the history
…nto merging-updated-distros
  • Loading branch information
philclifford committed Jan 17, 2022
2 parents fbec9cf + ad3332a commit a7de776
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ function os_support() {
regolith \
rockylinux \
solus \
tails \
ubuntu \
ubuntu-budgie \
ubuntu-kylin \
Expand Down Expand Up @@ -404,6 +405,10 @@ function releases_solus() {
4.3-plasma
}

function releases_tails() {
echo stable
}

function releases_ubuntu() {
echo bionic \
focal \
Expand Down Expand Up @@ -643,6 +648,9 @@ function make_vm_config() {
elif [ "${OS}" == "solus" ]; then
GUEST="linux"
IMAGE_TYPE="iso"
elif [[ "${OS}" == "tails" ]]; then
GUEST="linux"
IMAGE_TYPE="iso"
elif [[ "${OS}" == *"ubuntu"* ]]; then
GUEST="linux"
IMAGE_TYPE="iso"
Expand Down Expand Up @@ -685,6 +693,10 @@ EOF
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
fi

if [ "${OS}" == "tails" ]; then
echo "boot=\"legacy\"" >> "${OS}-${RELEASE}.conf"
fi

if [ "${OS}" == "macos" ]; then
echo "macos_release=\"${RELEASE}\"" >> "${OS}-${RELEASE}.conf"
fi
Expand Down Expand Up @@ -1302,6 +1314,18 @@ function get_regolith() {
make_vm_config "${ISO}"
}

function get_tails() {
validate_release "releases_tails"

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=$(echo "${URL}" | sed -e "s/.*\/\([^\/]*\)$/\1/")
web_get "${URL}" "${VM_PATH}"
check_hash "${ISO}" "${HASH}"
make_vm_config "${ISO}"
}

function get_ubuntu() {
local DEVEL="daily-live"
Expand Down Expand Up @@ -1915,6 +1939,8 @@ if [ -n "${2}" ]; then
get_rocky "${ISOTYPE}"
elif [ "${OS}" == "solus" ]; then
get_solus
elif [[ "${OS}" == "tails"* ]]; then
get_tails
elif [[ "${OS}" == *"ubuntu"* ]]; then
get_ubuntu
elif [ "${OS}" == "windows" ]; then
Expand Down Expand Up @@ -1988,6 +2014,8 @@ else
releases_rockylinux
elif [ "${OS}" == "solus" ]; then
releases_solus
elif [[ "${OS}" == "tails"* ]]; then
releases_tails
elif [[ "${OS}" == *"ubuntu"* ]]; then
releases_ubuntu
elif [ "${OS}" == "windows" ]; then
Expand Down

0 comments on commit a7de776

Please sign in to comment.