From 53b0afe647b011e63099e91d6e9895df0309049a Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 14 Sep 2023 14:43:19 -0300 Subject: Updates tor-browser-dl --- tor-browser-dl | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/tor-browser-dl b/tor-browser-dl index 5f25c18..5befce7 100755 --- a/tor-browser-dl +++ b/tor-browser-dl @@ -14,7 +14,8 @@ VERSION="$1" ARCH="$2" #LANG="$3" LANG="ALL" -BASE_URL="https://dist.torproject.org/torbrowser/$VERSION" +#BASE_URL="https://dist.torproject.org/torbrowser/$VERSION" +BASE_URL="https://archive.torproject.org/tor-package-archive/torbrowser/" # Syntax check if [ -z "$VERSION" ]; then @@ -25,9 +26,17 @@ if [ -z "$VERSION" ]; then exit 1 fi -# Set arch -if [ -z "$ARCH" ]; then - ARCH="linux64" +# Determine architecture +if [ "$ARCH" = "i386" ]; then + ARCH="linux32" +elif [ "$ARCH" = "i686" ]; then + ARCH="linux32" +elif [ "$ARCH" = "x86_64" ]; then + if [ "$APP" = "tor-browser" ]; then + ARCH="linux64" + else + ARCH="linux-x86_64" + fi fi # Set lang @@ -51,12 +60,12 @@ mkdir -p "$APP_BASE" # Download package if [ ! -e "$DL/$FILE" ]; then - wget -c "$BASE_URL/$FILE" -O "$DL/$FILE" || exit 1 + wget -c "$BASE_URL/$VERSION/$FILE" -O "$DL/$FILE" || exit 1 fi # Download signature if [ ! -e "$DL/$SIGN" ]; then - wget -c "$BASE_URL/$SIGN" -O "$DL/$SIGN" || exit 1 + wget -c "$BASE_URL/$VERSION/$SIGN" -O "$DL/$SIGN" || exit 1 fi # Check signature -- cgit v1.2.3