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>
This commit is contained in:
committed by
John Hood
parent
e8f1004f94
commit
94027efc45
+8
-2
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user