/[soft]/mgatools/trunk/clean-rpmsrate
ViewVC logotype

Diff of /mgatools/trunk/clean-rpmsrate

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1063 by boklm, Sun May 1 21:07:18 2011 UTC revision 3480 by tv, Thu Mar 15 08:28:46 2012 UTC
# Line 5  Line 5 
5  use strict;  use strict;
6  use MGATools::rpmsrate qw(cleanrpmsrate);  use MGATools::rpmsrate qw(cleanrpmsrate);
7    
8  $ARGV[0] =~ /-o/ and shift @ARGV and my $rpmsrate = shift;  my $rpmsrate;
9    $ARGV[0] =~ /-o/ and shift @ARGV and $rpmsrate = shift;
10    
11  $ARGV[1] or print "\nUsage:  $ARGV[1] or print "\nUsage:
12          clean-rpmsrate [options] <rpmsrate file> <RPMs dir 1> <RPMs dir 2> ... <RPMs dir n>          clean-rpmsrate [options] <rpmsrate file> <RPMs dir 1> <RPMs dir 2> ... <RPMs dir n>
13    
14          options:          options:
15                  -o file: output file\n\n" and exit;                  -o file: output file\n\n" and exit();
16    
17  my %rpm;  my %rpm;
18  my $rpmsrate_base = shift @ARGV;  my $rpmsrate_base = shift @ARGV;
19  foreach my $d (@ARGV) { $rpm{$d} = [ map { s/$d\/?(.*)\.rpm$/$1/; $_ } glob "$d/*.rpm" ] };  foreach my $d (@ARGV) {
20  cleanrpmsrate($rpmsrate_base,$rpmsrate,0, \%rpm);      $rpm{$d} = [ map { s!$d/?(.*)\.rpm$!$1!; $_ } glob "$d/*.rpm" ];
21    }
22    cleanrpmsrate($rpmsrate_base, $rpmsrate, 0, \%rpm);

Legend:
Removed from v.1063  
changed lines
  Added in v.3480

  ViewVC Help
Powered by ViewVC 1.1.30