aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-11-04 11:32:02 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-11-04 11:32:02 -0200
commit114d23381c9c92a607a76bb635797465056d90cb (patch)
treeab9a083dce3c9285fa8825a507786d4cb1305d40
parenta7e90406d36187dff9814530a45cf6964fc15b0a (diff)
downloadscripts-114d23381c9c92a607a76bb635797465056d90cb.tar.gz
scripts-114d23381c9c92a607a76bb635797465056d90cb.tar.bz2
Check download at tor-browser-dl
-rwxr-xr-xtor-browser-dl12
1 files changed, 9 insertions, 3 deletions
diff --git a/tor-browser-dl b/tor-browser-dl
index 2c54bb0..cfc72a9 100755
--- a/tor-browser-dl
+++ b/tor-browser-dl
@@ -44,9 +44,15 @@ fi
# Temp folder
mkdir -p $TEMP
-# Download
-wget -c $BASE_URL/$FILE -O $DL/$FILE || exit 1
-wget -c $BASE_URL/$SIGN -O $DL/$SIGN || exit 1
+# 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 $TEMP/$SIGN $DL/$FILE || exit 1