]> git.pld-linux.org Git - packages/rpm.git/blobdiff - rpm-php-requires
- drop platform definitions unused in rpm.org
[packages/rpm.git] / rpm-php-requires
index c92786c8485db53923308d7694c1173f52a21ef2..2a3fb601ac143e2bcc7fd30ca02f84dd91255cee 100644 (file)
 # - some clean-up...                                                #
 #####################################################################
 
-die "You have to specify input files" if (@ARGV < 1);
-
 $pear = "/usr/share/pear";
 
 @files = ();
 %req = ();
 
-while (@ARGV > 0) {
-       $f = shift;
+foreach (@ARGV ? $ARGV : <> ) {
+       chomp;
+       $f = $_;
        push @files, $f;
        # skip non-php files
        next unless ($f =~ /\.php$/);
@@ -49,6 +48,7 @@ while (@ARGV > 0) {
                        }
 
                        next if ($x =~ m|^\./| or $x =~ /\$/);
+                       next unless ($x =~ /\.php$/);
                        $req{$x} = 1;
                }
 
@@ -67,6 +67,7 @@ while (@ARGV > 0) {
                        }
 
                        next if ($x =~ /\$/);
+                       next unless ($x =~ /\.php$/);
 
                        $x = "$file_dir/$x";
                        $x =~ s|/+|/|g;
This page took 0.055858 seconds and 4 git commands to generate.