Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 14 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
19 magnus 1
Description: Improve handling of -h[e[l[p]]]
2
 Catches -he and -hel as well, instead of letting wish print its usage
3
 message (that sounds like an error message).
4
Author: Magnus Holmgren <holmgren@debian.org>
5
Bug-Debian: http://bugs.debian.org/544250
4 magnus 6
 
7
diff -urNad trunk~/scripts/ssvnc trunk/scripts/ssvnc
14 magnus 8
--- trunk~/scripts/ssvnc        2009-12-27 21:38:58.000000000 +0100
9
+++ trunk/scripts/ssvnc 2010-02-06 20:38:41.000000000 +0100
4 magnus 10
@@ -8,7 +8,8 @@
11
 #
12
 # See ssvnc_cmd for details.
13
 #
14
-if [ "X$1" = "X-help" -o "X$1" = "X-h" ]; then
15
+helpflag="-help"
16
+if [ ${#1} -gt 1 -a "$1${helpflag##$1}" = $helpflag ]; then
17
        cat << END
18
 ssvnc - a GUI wrapper for SSL and SSH VNC connections.
19
 
14 magnus 20
@@ -106,7 +107,7 @@
21
        exit 0
22
 fi
23
 if [ "X$1" = "X-ssh" ]; then
24
-       if [ "X$2" = "X-help" -o "X$2" = "X-h" ]; then
25
+       if [ ${#2} -gt 1 -a "$2${helpflag##$2}" = $helpflag ]; then
26
                cat << END
27
 sshvnc - a GUI wrapper for SSH VNC connections.
28
 
29
@@ -124,7 +125,7 @@
30
 fi
31
 
32
 if [ "X$1" = "X-ts" -o "X$1" = "X-tso" ]; then
33
-       if [ "X$2" = "X-help" -o "X$2" = "X-h" ]; then
34
+       if [ ${#2} -gt 1 -a "$2${helpflag##$2}" = $helpflag ]; then
35
                cat << END
36
 tsvnc - a GUI wrapper for SSH VNC connections using x11vnc Terminal Services.
37