summaryrefslogtreecommitdiff
path: root/bin/libsize.pl
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-29 03:25:16 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1999-06-29 03:25:16 +0000
commitc143a6d111b2ac86e55d21db43d789949a61087b (patch)
tree004f28ad24fd68edff64e4e9a82debdbbd1c98e2 /bin/libsize.pl
parent7d3571004e8c5d1069f2cba1ca8809b230b43228 (diff)
downloadATCD-c143a6d111b2ac86e55d21db43d789949a61087b.tar.gz
fix arg processing
Diffstat (limited to 'bin/libsize.pl')
-rwxr-xr-xbin/libsize.pl11
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 {