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