#!/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