aboutsummaryrefslogtreecommitdiff
path: root/tor-browser-dl
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2023-11-27 15:51:45 -0300
committerSilvio Rhatto <rhatto@riseup.net>2023-11-27 15:51:45 -0300
commit2e6ea68c827c9ccc9dc8422eb1810739e38a8ff6 (patch)
treef15b53cd256137e3efcf1d0ff09ab7dd183dd796 /tor-browser-dl
parenta1f1729201081b1aa58ec1101dce240ec021fa2d (diff)
downloaddownloaders-2e6ea68c827c9ccc9dc8422eb1810739e38a8ff6.tar.gz
downloaders-2e6ea68c827c9ccc9dc8422eb1810739e38a8ff6.tar.bz2
Fix: tor-browser-dl: use new folder scheme
Diffstat (limited to 'tor-browser-dl')
-rwxr-xr-xtor-browser-dl14
1 files changed, 9 insertions, 5 deletions
diff --git a/tor-browser-dl b/tor-browser-dl
index 797d9f8..b6e8993 100755
--- a/tor-browser-dl
+++ b/tor-browser-dl
@@ -58,7 +58,7 @@ fi
# Create folders
mkdir -p "$TEMP"
-mkdir -p "$APP_BASE"
+mkdir -p "$APP_BASE/$ARCH"
mkdir -p "$DL"
# Download package
@@ -83,10 +83,14 @@ fi
# Unpack
( cd "$TEMP" && tar xf "$DL/$FILE" ) || exit 1
-# Move and symlink
-mv "$TEMP/tor-browser_$LANG" "$APP_BASE/$ARCH-$VERSION"
-rm -rf $APP_BASE/$ARCH && \
-( cd "$APP_BASE" && ln -sf "$ARCH-$VERSION" "$ARCH" )
+# Install
+rm -rf $APP_BASE/$ARCH/$VERSION || exit 1
+mv "$TEMP/tor-browser_$LANG" "$APP_BASE/$ARCH/$VERSION" || exit 1
+
+# Create symlink to scripts
+mkdir -p $HOME/.local/bin || exit 1
+cd $HOME/.local/bin || exit 1
+ln -sf $APP_BASE/$ARCH/$VERSION/Browser/start-tor-browser $APP-${ARCH}-${VERSION} || exit 1
# Set pentadactyl if available
#if [ -e "$HOME/.pentadactyl" ]; then