test list creation tool
Matt S Trout [Sun, 15 Jul 2012 17:58:37 +0000 (17:58 +0000)]
bin/ezpz-create-test-ezmlm-list [new file with mode: 0755]

diff --git a/bin/ezpz-create-test-ezmlm-list b/bin/ezpz-create-test-ezmlm-list
new file mode 100755 (executable)
index 0000000..06344e1
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/env perl
+
+use lib (-d 'lib' ? ('lib') : ());
+use IO::All;
+use IPC::System::Simple qw(run);
+use strictures 1;
+
+die "Usage: ezpz-create-test-ezmlm-list ezmlm-bindir list-base-dir list-name"
+  unless @ARGV == 3;
+
+my ($ezmlm_bin_path, $list_base_path, $list_name) = @ARGV;
+
+my $ezmlm_bin = io->dir(io->dir($ezmlm_bin_path)->rel2abs);
+
+my $list_base = io->dir(io->dir($list_base_path)->rel2abs);
+
+run(
+  $ezmlm_bin->catfile('ezmlm-make'),
+  $list_base->catdir($list_name),
+  $list_base->catfile("dot-qmail-for-${list_name}"),
+  $list_name,
+  'example.com'
+);