aboutsummaryrefslogtreecommitdiff
path: root/tails-dl
diff options
context:
space:
mode:
Diffstat (limited to 'tails-dl')
-rwxr-xr-xtails-dl45
1 files changed, 45 insertions, 0 deletions
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 <version>"
+ 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