aboutsummaryrefslogtreecommitdiffstats
path: root/perl.req-from-meta
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2014-09-15 14:35:21 +0200
committerThomas Backlund <tmb@mageia.org>2014-09-15 18:20:59 +0300
commit5df8882f69673744a2dc20124e898037b1e824da (patch)
treedbb23d5bc697956084696e49c37f926884904020 /perl.req-from-meta
parent2680d325941a26981f766e6c879ce3dc64a9db4f (diff)
downloadrpm-setup-5df8882f69673744a2dc20124e898037b1e824da.tar
rpm-setup-5df8882f69673744a2dc20124e898037b1e824da.tar.gz
rpm-setup-5df8882f69673744a2dc20124e898037b1e824da.tar.bz2
rpm-setup-5df8882f69673744a2dc20124e898037b1e824da.tar.xz
rpm-setup-5df8882f69673744a2dc20124e898037b1e824da.zip
retrieve file name from stdin
Diffstat (limited to 'perl.req-from-meta')
-rwxr-xr-xperl.req-from-meta3
1 files changed, 2 insertions, 1 deletions
diff --git a/perl.req-from-meta b/perl.req-from-meta
index 3105259..a38244a 100755
--- a/perl.req-from-meta
+++ b/perl.req-from-meta
@@ -7,7 +7,8 @@ use JSON qw{ from_json };
use YAML qw{ Load };
# slurp the file
-my $path = shift;
+my $path = <>;
+chomp($path);
open my $fh, '<', $path or die "can't open $path: $!";
my $data = do { local $/; <$fh> };
close $fh;