blob: a657203994a2f6d2c355b168802c49ee65c5f357 (
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 Tails images
#
# Parameters
BASENAME="`basename $0`"
DL="$HOME/data/distros/tails/"
VERSION="$1"
BASE_URL="http://dl.amnesia.boum.org/tails/stable/tails-amd64-$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-amd64-$VERSION.iso"
#HYBRID="tails-amd64-$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-amd64-latest.iso
ln -sf $SIGN tails-amd64-latest.iso.sig
#cp $FILE $HYBRID
#ln -sf $HYBRID tails-amd64-latest.hybrid.iso
#isohybrid $HYBRID
cd $CWD
|