blob: 35fc0f4198be8f76d4ee19b580f8717e7c2b56db (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#!/bin/bash
#
# Download the Tails
#
# Parameters
BASENAME="`basename $0`"
DL="$HOME/data/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
|