Rev 25 | 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 | |
25 | magnus | 7 | --- a/scripts/ssvnc |
8 | +++ b/scripts/ssvnc |
||
4 | magnus | 9 | @@ -8,7 +8,8 @@ |
10 | # |
||
11 | # See ssvnc_cmd for details. |
||
12 | # |
||
13 | -if [ "X$1" = "X-help" -o "X$1" = "X-h" ]; then |
||
14 | +helpflag="-help" |
||
15 | +if [ ${#1} -gt 1 -a "$1${helpflag##$1}" = $helpflag ]; then |
||
16 | cat << END |
||
17 | ssvnc - a GUI wrapper for SSL and SSH VNC connections. |
||
18 | |||
25 | magnus | 19 | @@ -111,7 +112,7 @@ END |
14 | magnus | 20 | exit 0 |
21 | fi |
||
22 | if [ "X$1" = "X-ssh" ]; then |
||
23 | - if [ "X$2" = "X-help" -o "X$2" = "X-h" ]; then |
||
24 | + if [ ${#2} -gt 1 -a "$2${helpflag##$2}" = $helpflag ]; then |
||
25 | cat << END |
||
26 | sshvnc - a GUI wrapper for SSH VNC connections. |
||
27 | |||
25 | magnus | 28 | @@ -129,7 +130,7 @@ END |
14 | magnus | 29 | fi |
30 | |||
31 | if [ "X$1" = "X-ts" -o "X$1" = "X-tso" ]; then |
||
32 | - if [ "X$2" = "X-help" -o "X$2" = "X-h" ]; then |
||
33 | + if [ ${#2} -gt 1 -a "$2${helpflag##$2}" = $helpflag ]; then |
||
34 | cat << END |
||
35 | tsvnc - a GUI wrapper for SSH VNC connections using x11vnc Terminal Services. |
||
36 |