generalize manifest adding script
Graham Knop [Wed, 22 Jul 2015 13:24:07 +0000 (09:24 -0400)]
helpers/add-readme-to-manifest [deleted file]
helpers/add-to-manifest [new file with mode: 0755]
lib/Distar.pm

diff --git a/helpers/add-readme-to-manifest b/helpers/add-readme-to-manifest
deleted file mode 100644 (file)
index 88a30b0..0000000
+++ /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 (executable)
index 0000000..93608aa
--- /dev/null
@@ -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";
+}
index 0c2124a..f4336ac 100644 (file)
@@ -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;