aboutsummaryrefslogtreecommitdiff
path: root/tor-browser-dl
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-09-22 10:32:15 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-09-22 10:32:15 -0300
commite74f5cbc8b967d19810a3bba525e9e0a314ad488 (patch)
tree5a7596661c3c77e7e5577df00586bd6956993f86 /tor-browser-dl
parentec0b80651c2e333f048b9bcf2f8d050338755f0a (diff)
downloaddownloaders-e74f5cbc8b967d19810a3bba525e9e0a314ad488.tar.gz
downloaders-e74f5cbc8b967d19810a3bba525e9e0a314ad488.tar.bz2
Feat: tor-browser-dl: adds a 'download-only' flag
Diffstat (limited to 'tor-browser-dl')
-rwxr-xr-xtor-browser-dl10
1 files changed, 9 insertions, 1 deletions
diff --git a/tor-browser-dl b/tor-browser-dl
index e100df5..ee70585 100755
--- a/tor-browser-dl
+++ b/tor-browser-dl
@@ -12,6 +12,7 @@ TEMP="$TMP/tor-browser"
DL="$HOME/data/distros/tor/"
VERSION="$1"
ARCH="$2"
+DL_ONLY="$3"
#LANG="$3"
#LANG="ALL"
#BASE_URL="https://dist.torproject.org/torbrowser/$VERSION"
@@ -21,8 +22,9 @@ BASE_URL="https://archive.torproject.org/tor-package-archive/torbrowser/"
if [ -z "$VERSION" ]; then
#echo "usage: $BASENAME <version> [arch] [lang]"
#echo "example: $BASENAME 12.5.2 linux64 en-US"
- echo "usage: $BASENAME <version> [arch]"
+ echo "usage: $BASENAME <version> [arch] [donwload-only]"
echo "example: $BASENAME 12.5.2 linux64"
+ echo "example: $BASENAME 12.5.2 linux64 download-only"
exit 1
fi
@@ -81,6 +83,12 @@ fi
# Check signature
gpg --verify "$DL/$SIGN" "$DL/$FILE" || exit 1
+if [ ! -z "$DL_ONLY" ] && [ "$DL_ONLY" == "download-only" ]; then
+ echo "$BASENAME: Tor Browser $VERSION for $ARCH saved on $DL/$FILE"
+ echo "$BASENAME: Signature saved at $DL/$SIGN"
+ exit
+fi
+
# Unpack
( cd "$TEMP" && tar xf "$DL/$FILE" ) || exit 1