summaryrefslogtreecommitdiffstats
path: root/clean-rpmsrate
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-15 08:28:46 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-15 08:28:46 +0000
commit9b8a236ca329fec15401573ebd57d7a7b1d212ee (patch)
treebe74fab72ba10d35ffb7fe2a46b061e484b1e093 /clean-rpmsrate
parent258a0fc4a08a80ec197f7b9a0345258324b5349b (diff)
downloadmgatools-9b8a236ca329fec15401573ebd57d7a7b1d212ee.tar
mgatools-9b8a236ca329fec15401573ebd57d7a7b1d212ee.tar.gz
mgatools-9b8a236ca329fec15401573ebd57d7a7b1d212ee.tar.bz2
mgatools-9b8a236ca329fec15401573ebd57d7a7b1d212ee.tar.xz
mgatools-9b8a236ca329fec15401573ebd57d7a7b1d212ee.zip
perl_checker cleanups
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);