aboutsummaryrefslogtreecommitdiff
path: root/tor-browser
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2017-01-10 16:36:11 -0200
committerSilvio Rhatto <rhatto@riseup.net>2017-01-10 16:36:11 -0200
commitf790297980a1b9e380c814035d44c6cefa31b7c8 (patch)
tree9c62c010801f52a3e05ec873246a18be7e125a93 /tor-browser
parente245b09b84c0076a9af3fc4b789000f618b35282 (diff)
downloadutils-tor-f790297980a1b9e380c814035d44c6cefa31b7c8.tar.gz
utils-tor-f790297980a1b9e380c814035d44c6cefa31b7c8.tar.bz2
Support for torbrowser-launcher at tor-browser
Diffstat (limited to 'tor-browser')
-rwxr-xr-xtor-browser49
1 files changed, 38 insertions, 11 deletions
diff --git a/tor-browser b/tor-browser
index eaf2b48..87b97f1 100755
--- a/tor-browser
+++ b/tor-browser
@@ -3,16 +3,43 @@
# Wrapper for the Tor Software Bundle
#
-ARCH="`uname -m`"
+# Parameters
+BASENAME="`basename $0`"
-if [ "$ARCH" == "i386" ]; then
- ARCH="linux32"
-elif [ "$ARCH" == "i686" ]; then
- ARCH="linux32"
-elif [ "$ARCH" == "x86_64" ]; then
- ARCH="linux64"
-fi
+# Prefer torbrowser-launcher
+if which torbrowser-launcher &> /dev/null; then
+ FOLDER="$HOME/.local/share/torbrowser/tbb/x86_64/tor-browser_pt-PT/Browser"
+
+ # Sync vimperator config
+ if [ -e "$HOME/.vimperator" ] && [ -d "$FOLDER" ]; then
+ (
+ cd "$FOLDER"
+ ln -s "$HOME/.vimperator"
+ ln -s "$HOME/.vimperatorrc"
+ )
+ fi
+
+ # Launch the other wrapper
+ torbrowser-launcher &
+else
+ # Classic mode
+ ARCH="`uname -m`"
-mkdir -p $HOME/apps/tor-browser/$ARCH/Logs
-cd $HOME/apps/tor-browser/$ARCH
-$HOME/apps/tor-browser/$ARCH/start-tor-browser.desktop &> $HOME/apps/tor-browser/$ARCH/Logs/tor-browser.log &
+ if [ "$ARCH" == "i386" ]; then
+ ARCH="linux32"
+ elif [ "$ARCH" == "i686" ]; then
+ ARCH="linux32"
+ elif [ "$ARCH" == "x86_64" ]; then
+ ARCH="linux64"
+ fi
+
+ FOLDER="$HOME/apps/tor-browser/$ARCH"
+
+ if [ -d "$FOLDER" ]; then
+ mkdir -p $FOLDER/Logs
+ cd $FOLDER
+ $FOLDER/start-tor-browser.desktop &> $FOLDER/Logs/tor-browser.log &
+ else
+ echo "Please download Tor Browser using tor-browser-dl or torbrowser-launcher first."
+ fi
+fi