From b9a596c1d2fceb73564eacdc49b1448873c8fe1f Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 18 Sep 2014 16:36:19 -0300 Subject: Initial import --- tails-dl | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 tails-dl (limited to 'tails-dl') diff --git a/tails-dl b/tails-dl new file mode 100755 index 0000000..685e3b3 --- /dev/null +++ b/tails-dl @@ -0,0 +1,45 @@ +#!/bin/bash +# +# Download the Tails +# + +# Parameters +BASENAME="`basename $0`" +DL="$HOME/data/apps/distros/tails/" +VERSION="$1" +BASE_URL="http://dl.amnesia.boum.org/tails/stable/tails-i386-$VERSION" +CWD="`pwd`" + +# Syntax check +if [ -z "$VERSION" ]; then + echo "usage: $BASENAME " + echo "example: $BASENAME 0.22" + exit 1 +fi + +# Set file names +FILE="tails-i386-$VERSION.iso" +HYBRID="tails-i386-$VERSION.hybrid.iso" +SIGN="$FILE.sig" + +# Download package +if [ ! -e "$DL/$FILE" ]; then + wget -c $BASE_URL/$FILE -O $DL/$FILE || exit 1 +fi + +# Download signature +if [ ! -e "$DL/$SIGN" ]; then + wget -c $BASE_URL/$SIGN -O $DL/$SIGN || exit 1 +fi + +# Check signature +gpg --verify $DL/$SIGN $DL/$FILE || exit 1 + +# Symlink and hybrid version +cd $DL +ln -sf $FILE tails-i386-latest.iso +ln -sf $SIGN tails-i386-latest.iso.sig +cp $FILE $HYBRID +ln -sf $HYBRID tails-i386-latest.hybrid.iso +isohybrid $HYBRID +cd $CWD -- cgit v1.2.3