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 734e782d95752b4f17dd2a000aa4466e30b001c9
parent 7516165e61eb7c3f4e1f182b55aa0d723bf88fba
Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
Date:   Sun,  8 Sep 2013 21:59:18 +0200

the script only uses torify if it is installed on the system

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

diff --git a/bin/tor-browser-update.sh b/bin/tor-browser-update.sh @@ -2,6 +2,7 @@ # Gets latest Tor Browser Bundle development version for Linux x86_64, downloads # it, verifies it, and extracts it. +# The scripts downloads the files using "torify", if available. # To import the signing key to Debian run: # $ gpg --keyserver keys.gnupg.net --recv 886DDD89 @@ -9,10 +10,16 @@ # $ sudo apt-get update # $ sudo apt-get install deb.torproject.org-keyring -DOWNLOADCMD="torify wget" TORFOLDER=~/tor DIR="https://www.torproject.org/dist/torbrowser/linux/" +# Check if torify is installed +if hash torify 2>/dev/null; then + DOWNLOADCMD="torify wget" +else + DOWNLOADCMD="wget" +fi + # Find latest TBB version echo "Determining latest Tor Browser Bundle development version" TMPFILENAME=.tordownloadpage.html @@ -23,7 +30,7 @@ rm $TMPFILENAME # Check if the TBB version is already downloaded if [ -e $TORFOLDER/$LATESTTBB ]; then - echo "You are up to date" + echo "The installed TBB version is up to date." exit fi