diff options
author | Anders Kaseorg <andersk@mit.edu> | 2016-11-08 17:02:30 -0500 |
---|---|---|
committer | John Hood <cgull@glup.org> | 2016-11-19 17:15:48 -0500 |
commit | 94027efc455855d4ed777048ad2e8fef73ef02d8 (patch) | |
tree | cc1665b8f9c7fc834292a09f754e9efc72159ce7 /scripts | |
parent | e8f1004f9497a70a3612067f6daad32635cb1bcf (diff) |
Make all commands properly support --help and --version
These should output to stdout and exit with status 0. Passing
std-options to AM_INIT_AUTOMAKE causes ‘make installcheck’ (hence also
‘make distcheck’) to verify this.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/mosh.pl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/scripts/mosh.pl b/scripts/mosh.pl index 40a9309..cb74405 100755 --- a/scripts/mosh.pl +++ b/scripts/mosh.pl @@ -166,8 +166,14 @@ GetOptions( 'client=s' => \$client, 'bind-server=s' => \$bind_ip, 'experimental-remote-ip=s' => \$use_remote_ip) or die $usage; -die $usage if ( defined $help ); -die $version_message if ( defined $version ); +if ( defined $help ) { + print $usage; + exit; +} +if ( defined $version ) { + print $version_message; + exit; +} if ( defined $predict ) { predict_check( $predict, 0 ); |