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