diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-29 03:25:16 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-06-29 03:25:16 +0000 |
commit | c143a6d111b2ac86e55d21db43d789949a61087b (patch) | |
tree | 004f28ad24fd68edff64e4e9a82debdbbd1c98e2 /bin/libsize.pl | |
parent | 7d3571004e8c5d1069f2cba1ca8809b230b43228 (diff) | |
download | ATCD-c143a6d111b2ac86e55d21db43d789949a61087b.tar.gz |
fix arg processing
Diffstat (limited to 'bin/libsize.pl')
-rwxr-xr-x | bin/libsize.pl | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/libsize.pl b/bin/libsize.pl index b165d5b535f..db0f09ca531 100755 --- a/bin/libsize.pl +++ b/bin/libsize.pl @@ -49,21 +49,20 @@ $lib_extension = 'a'; #### #### Process command line args. #### -@argv = @ARGV; -foreach my $arg (@argv) { - if ($arg eq '-h') { +while ($#ARGV >= $[ && $ARGV[0] =~ /^-/) { + if ($ARGV[0] eq '-h') { $html = 1; chop ($sysname = `uname -s`); chop ($sysrev = `uname -r`); shift; - } elsif ($arg eq '-s') { + } elsif ($ARGV[0] eq '-s') { $lib_extension = 'so'; $build_args =~ s/ static_libs_only=1//; shift; - } elsif ($arg eq '-v') { + } elsif ($ARGV[0] eq '-v') { $verbose = 1; shift; - } elsif ($arg eq '-?') { + } elsif ($ARGV[0] eq '-?') { print "$usage"; exit; } else { |