summaryrefslogtreecommitdiffstats
path: root/clean-rpmsrate
diff options
context:
space:
mode:
Diffstat (limited to 'clean-rpmsrate')
-rwxr-xr-xclean-rpmsrate11
1 files changed, 7 insertions, 4 deletions
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] <rpmsrate file> <RPMs dir 1> <RPMs dir 2> ... <RPMs dir n>
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);