[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-bundle/master] Bug 13717: Make sure we use the bash on Linux



commit d02cbafea85464044e2117913310ddd77c81efc7
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date:   Wed Feb 18 16:53:08 2015 +0000

    Bug 13717: Make sure we use the bash on Linux
    
    This is basically a patch by a cypherpunk. Additionally, this commit
    contains a small clean-up of the shell script.
---
 RelativeLink/RelativeLink.sh |   22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)

diff --git a/RelativeLink/RelativeLink.sh b/RelativeLink/RelativeLink.sh
index e75482a..8c51f47 100755
--- a/RelativeLink/RelativeLink.sh
+++ b/RelativeLink/RelativeLink.sh
@@ -5,20 +5,28 @@
 #
 # To run in debug mode simply pass --debug
 #
-# Copyright 2014 The Tor Project.  See LICENSE for licensing information.
+# Copyright 2015 The Tor Project.  See LICENSE for licensing information.
 
-complain_dialog_title="Tor Browser Bundle"
+complain_dialog_title="Tor Browser"
 
 # First, make sure DISPLAY is set.  If it isn't, we're hosed; scream
 # at stderr and die.
 if [ "x$DISPLAY" = "x" ]; then
-	echo "$complain_dialog_title must be run within the X Window System." >&2
-	echo "Exiting." >&2
-	exit 1
+    echo "$complain_dialog_title must be run within the X Window System." >&2
+    echo "Exiting." >&2
+    exit 1
+fi
+
+# Second, make sure this script wasn't started as 'sh start-tor-browser' or
+# similar.
+if [ "x$BASH" = "x" ]; then
+    echo "$complain_dialog_title should be started as './start-tor-browser'"
+    echo "Exiting." >&2
+    exit 1;
 fi
 
-# Do not (try to) connect to the session manager 
-unset SESSION_MANAGER 
+# Do not (try to) connect to the session manager
+unset SESSION_MANAGER
 
 # Determine whether we are running in a terminal.  If we are, we
 # should send our error messages to stderr...

_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits