move helpers location to inside lib
[p5sagit/Distar.git] / lib / Distar / helpers / add-to-manifest
1 #!/usr/bin/env perl
2 use strict;
3 use warnings FATAL => 'all';
4
5 use ExtUtils::Manifest 'maniadd';
6 use Getopt::Long qw(:config gnu_getopt);
7
8 GetOptions(
9   "d|distdir=s"    => \my $distdir,
10   "m|manifest=s"   => \my $manifest,
11 ) or die("Error in command line arguments\n");
12 if (defined $distdir) {
13   chdir $distdir;
14 }
15 if (defined $manifest) {
16   $ExtUtils::Manifest::MANIFEST = $manifest;
17 }
18
19 for my $file (@ARGV) {
20   eval { maniadd({ $file => "$file file (added by Distar)"}) }
21     or print "Could not add $file to MANIFEST: $@\n";
22 }