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

Annotation of /mgatools/trunk/clean-rpmsrate

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3531 - (hide annotations) (download)
Fri Mar 16 07:21:02 2012 UTC (12 years, 1 month ago) by tv
File size: 570 byte(s)
further simplify (Pascal Terjan)
1 boklm 1063 #!/usr/bin/perl
2     #
3     #
4    
5     use strict;
6 tv 3521 use MGATools::rpmsrate;
7 boklm 1063
8 tv 3485 my $output_file;
9 tv 3522 $ARGV[0] =~ /-o/ and do { shift @ARGV; $output_file = shift };
10 boklm 1063
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 tv 3480 -o file: output file\n\n" and exit();
16 boklm 1063
17 tv 3524 my $rpmsrate_raw_file = shift @ARGV;
18    
19 boklm 1063 my %rpm;
20 tv 3525 foreach my $dir (@ARGV) {
21 tv 3526 chdir($dir);
22 tv 3531 $rpm{$dir} = [ map { s!\.rpm$!!; $_ } glob "*.rpm" ];
23 tv 3480 }
24 tv 3526 chdir($ENV{PWD}); # in case -o referes to a relative path
25    
26 tv 3523 cleanrpmsrate($rpmsrate_raw_file, $output_file, \%rpm);

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.30