dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | README | LICENSE Back to index

commit 3ea3884d3a035575bcbddac659453b5647778070
parent 1cb8011599bd4b07ced8e808a02e897935b84b00
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Sun,  8 Sep 2013 20:54:35 +0200

Script doesn't download if the newest version is already downloaded

Diffstat:
Mbin/tor-browser-update.sh | 7+++++++
1 file changed, 7 insertions(+), 0 deletions(-)

diff --git a/bin/tor-browser-update.sh b/bin/tor-browser-update.sh @@ -13,6 +13,7 @@ DOWNLOADCMD="torify wget" TORFOLDER=~/tor DIR="https://www.torproject.org/dist/torbrowser/linux/" +# Find latest TBB version echo "Determining latest Tor Browser Bundle development version" TMPFILENAME=.tordownloadpage.html $DOWNLOADCMD https://www.torproject.org/projects/torbrowser.html.en#downloads -O $TMPFILENAME && \ @@ -20,6 +21,12 @@ LATESTTBB=`grep 'dev-en-US.tar.gz">64-bit' $TMPFILENAME | tail -n 1 | sed 's/.*t echo "Latest Tor Browser Bundle dev. version is $LATESTTBB" rm $TMPFILENAME +# Check if the TBB version is already downloaded +if [ -e $TORFOLDER/$LATESTTBB ]; then + echo "You are up to date" + exit +fi + mkdir -p $TORFOLDER cd $TORFOLDER &&\ echo "Attempting to download Tor Browser Bundle and signature"