From: Graham Knop Date: Mon, 18 Apr 2016 12:00:45 +0000 (-0400) Subject: update MANIFEST without needing to chdir X-Git-Tag: v0.003000~32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0114b835e1715e0d633f365f1622bc84dd5eedec;p=p5sagit%2FDistar.git update MANIFEST without needing to chdir --- diff --git a/helpers/add-to-manifest b/helpers/add-to-manifest index 93608aa..2e837bd 100755 --- a/helpers/add-to-manifest +++ b/helpers/add-to-manifest @@ -3,6 +3,18 @@ use strict; use warnings FATAL => 'all'; use ExtUtils::Manifest 'maniadd'; +use Getopt::Long qw(:config gnu_getopt); + +GetOptions( + "d|distdir=s" => \my $distdir, + "m|manifest=s" => \my $manifest, +) or die("Error in command line arguments\n"); +if (defined $distdir) { + chdir $distdir; +} +if (defined $manifest) { + $ExtUtils::Manifest::MANIFEST = $manifest; +} for my $file (@ARGV) { eval { maniadd({ $file => "$file file (added by Distar)"}) } diff --git a/lib/Distar.pm b/lib/Distar.pm index 1d41abb..d376141 100644 --- a/lib/Distar.pm +++ b/lib/Distar.pm @@ -172,7 +172,7 @@ readmefile: create_distdir $(DISTVNAME)/README: $(VERSION_FROM) $(NOECHO) $(MKPATH) $(DISTVNAME) pod2text $(VERSION_FROM) >$(DISTVNAME)/README - $(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) ../Distar/helpers/add-to-manifest README + $(NOECHO) $(ABSPERLRUN) Distar/helpers/add-to-manifest -d $(DISTVNAME) README disttest: distmanicheck distmanicheck: create_distdir cd $(DISTVNAME) && $(ABSPERLRUN) "-MExtUtils::Manifest=manicheck" -e "exit manicheck"