test list creation tool
[scpubgit/App-EzPz.git] / bin / ezpz-create-test-ezmlm-list
1 #!/usr/bin/env perl
2
3 use lib (-d 'lib' ? ('lib') : ());
4 use IO::All;
5 use IPC::System::Simple qw(run);
6 use strictures 1;
7
8 die "Usage: ezpz-create-test-ezmlm-list ezmlm-bindir list-base-dir list-name"
9   unless @ARGV == 3;
10
11 my ($ezmlm_bin_path, $list_base_path, $list_name) = @ARGV;
12
13 my $ezmlm_bin = io->dir(io->dir($ezmlm_bin_path)->rel2abs);
14
15 my $list_base = io->dir(io->dir($list_base_path)->rel2abs);
16
17 run(
18   $ezmlm_bin->catfile('ezmlm-make'),
19   $list_base->catdir($list_name),
20   $list_base->catfile("dot-qmail-for-${list_name}"),
21   $list_name,
22   'example.com'
23 );