From 5b465daebbeef4942f1ed9bd410cdbdecc7e4504 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Sun, 1 May 2011 21:07:18 +0000 Subject: add cleanrpmsrate --- clean-rpmsrate | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 clean-rpmsrate (limited to 'clean-rpmsrate') diff --git a/clean-rpmsrate b/clean-rpmsrate new file mode 100755 index 0000000..c8b11d4 --- /dev/null +++ b/clean-rpmsrate @@ -0,0 +1,19 @@ +#!/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); -- cgit v1.2.1