[tor-commits] [torbrowser/maint-2.2] [Linux] Accept -debug instead of --debug in RelativeLink.sh

erinn at torproject.org erinn at torproject.org
Sun Aug 28 18:19:35 UTC 2011


commit 0d007d4789ac142d5929529de3b1a0cf2082d385
Author: Robert Ransom <rransom.8774 at gmail.com>
Date:   Thu Aug 25 23:11:27 2011 -0400

    [Linux] Accept -debug instead of --debug in RelativeLink.sh
    
    Suggested by velope.
    (cherry picked from commit 52458db5b9a108d81c4869f10c4ee2bee4aeac18)
---
 src/RelativeLink/RelativeLink.sh |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/RelativeLink/RelativeLink.sh b/src/RelativeLink/RelativeLink.sh
index 2894ed7..08165c3 100755
--- a/src/RelativeLink/RelativeLink.sh
+++ b/src/RelativeLink/RelativeLink.sh
@@ -103,11 +103,15 @@ if [ "`id -u`" -eq 0 ]; then
 	exit 1
 fi
 
-if [ "$#" -eq 1 -a "x$1" = "x--debug" ]; then
+usage_message="usage: $0 [--debug]"
+if [ "$#" -eq 1 -a \( "x$1" = "x--debug" -o "x$1" = "x-debug" \) ]; then
 	debug=1
 	printf "\nDebug enabled.\n\n"
+elif [ "$#" -eq 1 -a \( "x$1" = "x--help" -o "x$1" = "x-help" \) ]; then
+	echo $usage_message
+	exit 1
 elif [ "$#" -ne 0 ]; then
-	complain "usage: $0 [--debug]"
+	complain $usage_message
 	exit 1
 fi
 





More information about the tor-commits mailing list