From: Graham Knop Date: Wed, 22 Jul 2015 13:24:07 +0000 (-0400) Subject: generalize manifest adding script X-Git-Tag: v0.002000~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7b09aa3b1a3489b611fb8d7f8742baa587450c31;p=p5sagit%2FDistar.git generalize manifest adding script --- diff --git a/helpers/add-readme-to-manifest b/helpers/add-readme-to-manifest deleted file mode 100644 index 88a30b0..0000000 --- a/helpers/add-readme-to-manifest +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings FATAL => 'all'; - -use ExtUtils::Manifest 'maniadd'; - -eval { maniadd({ README => "README file (added by Distar)"}) } - or print "Could not add README to MANIFEST: $@\n"; \ No newline at end of file diff --git a/helpers/add-to-manifest b/helpers/add-to-manifest new file mode 100755 index 0000000..93608aa --- /dev/null +++ b/helpers/add-to-manifest @@ -0,0 +1,10 @@ +#!/usr/bin/env perl +use strict; +use warnings FATAL => 'all'; + +use ExtUtils::Manifest 'maniadd'; + +for my $file (@ARGV) { + eval { maniadd({ $file => "$file file (added by Distar)"}) } + or print "Could not add $file to MANIFEST: $@\n"; +} diff --git a/lib/Distar.pm b/lib/Distar.pm index 0c2124a..f4336ac 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -48,7 +48,7 @@ sub manifest_include { my $readme_generator = <<'README'; pod2text $(VERSION_FROM) >$(DISTVNAME)/README - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) ../Distar/helpers/add-readme-to-manifest + $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) ../Distar/helpers/add-to-manifest README README sub readme_generator { $readme_generator = shift;