aboutsummaryrefslogtreecommitdiff
path: root/contrib/download_data
blob: 17989e38911785da80738e2860395f6d67c61b2d (plain) (blame)
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
#!/bin/sh

url=https://bitbucket.org/jhunkeler/calfuse/downloads/calfuse-data.tar.bz2
tarball=$(basename $url)

if [ -z "$(which wget 2>/dev/null)" ]; then
	echo Please install 'wget'.
	exit 1
fi

if [ -z "$(which tar 2>/dev/null)" ]; then
	echo Please install 'tar'.
	exit 1
fi

if [ -f "$tarball" ]; then
	echo $tarball already exists. Delete it and re-run this script.
	exit 1
fi

wget --no-check-certificate $url

if [ $? -ne 0 ]; then
	echo Aborting. Failed to download $tarball.
	exit 1
fi

echo Extracting $tarball ...
tar -xf $tarball