aboutsummaryrefslogtreecommitdiff
path: root/tor-browser-dl
diff options
context:
space:
mode:
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