summaryrefslogtreecommitdiffstats
path: root/clean-rpmsrate
diff options
context:
space:
mode:
Diffstat (limited to 'clean-rpmsrate')
-rwxr-xr-xclean-rpmsrate5
1 files changed, 4 insertions, 1 deletions
diff --git a/clean-rpmsrate b/clean-rpmsrate
index 2bdac4f..dc7a317 100755
--- a/clean-rpmsrate
+++ b/clean-rpmsrate
@@ -18,6 +18,9 @@ my $rpmsrate_raw_file = shift @ARGV;
my %rpm;
foreach my $dir (@ARGV) {
- $rpm{$dir} = [ map { s!$dir/?(.*)\.rpm$!$1!; $_ } glob "$dir/*.rpm" ];
+ chdir($dir);
+ $rpm{$dir} = [ map { s!(.*)\.rpm$!$1!; $_ } glob "*.rpm" ];
}
+chdir($ENV{PWD}); # in case -o referes to a relative path
+
cleanrpmsrate($rpmsrate_raw_file, $output_file, \%rpm);