mirror of
https://gitlab.com/shorewall/code.git
synced 2025-01-25 15:09:12 +01:00
A little cleanup of compiler.pl
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
ec95e5b32c
commit
50d246c8be
@ -45,7 +45,6 @@ use Shorewall::Compiler;
|
|||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
|
|
||||||
sub usage( $ ) {
|
sub usage( $ ) {
|
||||||
my $returnval = shift @_;
|
|
||||||
|
|
||||||
print STDERR 'usage: compiler.pl [ <option> ... ] [ <filename> ]
|
print STDERR 'usage: compiler.pl [ <option> ... ] [ <filename> ]
|
||||||
|
|
||||||
@ -63,7 +62,7 @@ sub usage( $ ) {
|
|||||||
[ --family={4|6} ]
|
[ --family={4|6} ]
|
||||||
';
|
';
|
||||||
|
|
||||||
exit $returnval;
|
exit shift @_;
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -109,7 +108,7 @@ my $result = GetOptions('h' => \$help,
|
|||||||
usage(1) unless $result && @ARGV < 2;
|
usage(1) unless $result && @ARGV < 2;
|
||||||
usage(0) if $help;
|
usage(0) if $help;
|
||||||
|
|
||||||
compiler( script => defined $ARGV[0] ? $ARGV[0] : '',
|
compiler( script => $ARGV[0] || '',
|
||||||
directory => $shorewall_dir,
|
directory => $shorewall_dir,
|
||||||
verbosity => $verbose,
|
verbosity => $verbose,
|
||||||
timestamp => $timestamp,
|
timestamp => $timestamp,
|
||||||
|
Loading…
Reference in New Issue
Block a user