Last change
on this file since 1 was
1,
checked in by fasma, 12 years ago
|
Initial Import from Mandriva's soft revision 224062 and package revision 45733
|
File size:
519 bytes
|
Line | |
---|
1 | #!/usr/bin/perl -I /home/warly/files/cvs/mdk/soft/mkcd/pm |
---|
2 | # |
---|
3 | # |
---|
4 | |
---|
5 | use strict; |
---|
6 | use Mkcd::Tools qw(cleanrpmsrate); |
---|
7 | |
---|
8 | $ARGV[0] =~ /-o/ and shift @ARGV and my $rpmsrate = shift; |
---|
9 | |
---|
10 | $ARGV[1] or print "\nUsage: |
---|
11 | clean-rpmsrate [options] <rpmsrate file> <RPMs dir 1> <RPMs dir 2> ... <RPMs dir n> |
---|
12 | |
---|
13 | options: |
---|
14 | -o file: output file\n\n" and exit; |
---|
15 | |
---|
16 | my %rpm; |
---|
17 | my $rpmsrate_base = shift @ARGV; |
---|
18 | foreach my $d (@ARGV) { $rpm{$d} = [ map { s/$d\/?(.*)\.rpm$/$1/; $_ } glob "$d/*.rpm" ] }; |
---|
19 | cleanrpmsrate($rpmsrate_base,$rpmsrate,0, \%rpm); |
---|
Note: See
TracBrowser
for help on using the repository browser.