diff options
author | Justin Davis <jrcd83@gmail.com> | 2011-09-10 01:30:50 +0200 |
---|---|---|
committer | Justin Davis <jrcd83@gmail.com> | 2011-09-10 01:30:50 +0200 |
commit | 2270512332f52574b7101361d0470141e798d090 (patch) | |
tree | 4bbc033d7773307e77b7501edbd1df95cf7b3fb1 /bin | |
parent | 8b9e98f62c624e0f329709ce7f52f3909e8ca1d1 (diff) | |
download | genpkg-2270512332f52574b7101361d0470141e798d090.tar.gz genpkg-2270512332f52574b7101361d0470141e798d090.tar.xz |
Use 'perl-dist' instead of $0. The path in $0 is too spammy...
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/macros/perl-dist | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/macros/perl-dist b/bin/macros/perl-dist index c2a5b9a..a5125b4 100755 --- a/bin/macros/perl-dist +++ b/bin/macros/perl-dist @@ -324,7 +324,7 @@ use Digest::SHA qw(); sub main { - my $distpath = shift or die "Usage: $0 [path to cpan dist file]\n"; + my $distpath = shift or die "Usage: perl-dist [path to cpan dist file]\n"; my $dir = dirname($distpath); my $file = basename($distpath); my $info = distinfo($file); @@ -396,15 +396,15 @@ sub extractdist my ($file) = @_; system "bsdtar -xf $file"; - die "$0: bsdtar failed to extract $file\n" unless $? == 0; + die "perl-dist: bsdtar failed to extract $file\n" unless $? == 0; opendir my $srcdir, '.' or die "opendir: $!"; my @dirs = grep { -d $_ && !/\A[.]/ } readdir $srcdir; closedir $srcdir; - die "$0: many dirs (@dirs) inside the tarball $file\n" + die "perl-dist: many dirs (@dirs) inside the tarball $file\n" if @dirs > 1; - die "$0: no dirs found in tarball $file\n" if @dirs == 0; + die "perl-dist: no dirs found in tarball $file\n" if @dirs == 0; return $dirs[0]; } @@ -413,7 +413,7 @@ sub printjam my ($pbvars) = @_; while (my ($name, $val) = each %$pbvars) { if (! defined $val || $val eq q{}) { - warn "$0: warning: $name is undefined\n"; + warn "perl-dist: warning: $name is undefined\n"; $val = q{}; } print "+ $name $_\n" for (ref $val ? @$val : $val); |