aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-09-14 14:43:19 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-09-14 14:43:19 -0300
commit53b0afe647b011e63099e91d6e9895df0309049a (patch)
tree5f138fc6bf9c526bd73cffee3227115ff7e04b95
parent84d6b2122dd65aa8549dfa52065c61856abb7163 (diff)
downloaddownloaders-53b0afe647b011e63099e91d6e9895df0309049a.tar.gz
downloaders-53b0afe647b011e63099e91d6e9895df0309049a.tar.bz2
Updates tor-browser-dl
-rwxr-xr-xtor-browser-dl21
1 files 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