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:
Anders Kaseorg
2016-11-08 17:02:30 -05:00
committed by John Hood
parent e8f1004f94
commit 94027efc45
4 changed files with 46 additions and 12 deletions
+8 -2
View File
@@ -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 );