From 9b8a236ca329fec15401573ebd57d7a7b1d212ee Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 15 Mar 2012 08:28:46 +0000 Subject: perl_checker cleanups --- clean-rpmsrate | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'clean-rpmsrate') diff --git a/clean-rpmsrate b/clean-rpmsrate index c8b11d4..f9b7777 100755 --- a/clean-rpmsrate +++ b/clean-rpmsrate @@ -5,15 +5,18 @@ use strict; use MGATools::rpmsrate qw(cleanrpmsrate); -$ARGV[0] =~ /-o/ and shift @ARGV and my $rpmsrate = shift; +my $rpmsrate; +$ARGV[0] =~ /-o/ and shift @ARGV and $rpmsrate = shift; $ARGV[1] or print "\nUsage: clean-rpmsrate [options] ... options: - -o file: output file\n\n" and exit; + -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); +foreach my $d (@ARGV) { + $rpm{$d} = [ map { s!$d/?(.*)\.rpm$!$1!; $_ } glob "$d/*.rpm" ]; +} +cleanrpmsrate($rpmsrate_base, $rpmsrate, 0, \%rpm); -- cgit v1.2.1