#!/usr/bin/perl # # use strict; use MGATools::rpmsrate; my $output_file; $ARGV[0] =~ /-o/ and do { shift @ARGV; $output_file = shift }; $ARGV[1] or print "\nUsage: clean-rpmsrate [options] ... options: -o file: output file\n\n" and exit(); my $rpmsrate_raw_file = shift @ARGV; my %rpm; foreach my $dir (@ARGV) { $rpm{$dir} = [ map { s!$dir/?(.*)\.rpm$!$1!; $_ } glob "$dir/*.rpm" ]; } cleanrpmsrate($rpmsrate_raw_file, $output_file, \%rpm);