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

Contents of /mgatools/trunk/clean-rpmsrate

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3531 - (show annotations) (download)
Fri Mar 16 07:21:02 2012 UTC (12 years ago) by tv
File size: 570 byte(s)
further simplify (Pascal Terjan)
1 #!/usr/bin/perl
2 #
3 #
4
5 use strict;
6 use MGATools::rpmsrate;
7
8 my $output_file;
9 $ARGV[0] =~ /-o/ and do { shift @ARGV; $output_file = shift };
10
11 $ARGV[1] or print "\nUsage:
12 clean-rpmsrate [options] <rpmsrate file> <RPMs dir 1> <RPMs dir 2> ... <RPMs dir n>
13
14 options:
15 -o file: output file\n\n" and exit();
16
17 my $rpmsrate_raw_file = shift @ARGV;
18
19 my %rpm;
20 foreach my $dir (@ARGV) {
21 chdir($dir);
22 $rpm{$dir} = [ map { s!\.rpm$!!; $_ } glob "*.rpm" ];
23 }
24 chdir($ENV{PWD}); # in case -o referes to a relative path
25
26 cleanrpmsrate($rpmsrate_raw_file, $output_file, \%rpm);

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30