From e74f5cbc8b967d19810a3bba525e9e0a314ad488 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Fri, 22 Sep 2023 10:32:15 -0300 Subject: Feat: tor-browser-dl: adds a 'download-only' flag --- tor-browser-dl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'tor-browser-dl') 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 [arch] [lang]" #echo "example: $BASENAME 12.5.2 linux64 en-US" - echo "usage: $BASENAME [arch]" + echo "usage: $BASENAME [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 -- cgit v1.2.3