Skip to content

Instantly share code, notes, and snippets.

@atweiden
Created March 15, 2016 20:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atweiden/7620b9d4a50585898ebf to your computer and use it in GitHub Desktop.
Save atweiden/7620b9d4a50585898ebf to your computer and use it in GitHub Desktop.
Fetch Tails
#!/bin/bash
# depends=('aria2' 'curl' 'gnupg')
_version=2.2
_tails_download_dir="$HOME/Downloads/tails-dl"
_tails_download_url=http://dl.amnesia.boum.org/tails/stable/tails-i386-$_version
_tails_download_name=tails-i386-$_version.iso
# https://tails.boum.org/doc/about/openpgp_keys/index.en.html
# fetch tails gpg sigs {{{
mkdir -p "$HOME/.gnupg"
# gpg --fetch-keys https://tails.boum.org/tails-signing.key
curl -k https://tails.boum.org/{tails-signing.key} -o "$HOME/.gnupg/#1"
gpg --import "$HOME/.gnupg/tails-signing.key"
# end fetch tails gpg sigs }}}
# https://dl.amnesia.boum.org/tails/
# fetch tails iso {{{
mkdir -p "$_tails_download_dir" && pushd "$_tails_download_dir"
curl -O "$_tails_download_url/$_tails_download_name.sig"
aria2c \
--continue=true \
--dir="$_tails_download_dir" \
--max-connection-per-server=3 \
--min-split-size=10M \
"$_tails_download_url/$_tails_download_name"
gpg -v "$_tails_download_name.sig"
popd
# end fetch tails iso }}}
# vim: ft=sh fdm=marker fdl=0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment