X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=bin%2Fezpz-admin-repl;h=c26e8ac4f73a449ed52f38aa55a340a8deccaaf5;hb=6a99a8c7e0ba1b91f2197dce11bf72aa88f8cda8;hp=0ba544520e479b5f3da6a34e5f6466c0b9bb079e;hpb=5b26866ea3dc1b51e669b9e213d002c05de81e14;p=scpubgit%2FApp-EzPz.git diff --git a/bin/ezpz-admin-repl b/bin/ezpz-admin-repl index 0ba5445..c26e8ac 100755 --- a/bin/ezpz-admin-repl +++ b/bin/ezpz-admin-repl @@ -1,11 +1,12 @@ #!/usr/bin/env perl +use lib (-d 'lib' ? ('lib') : ()); use File::Which; use App::EzPz::UserStore; use strictures 1; -die "Usage: ezpz-admin-repl ezmlm-bindir htpasswd-file" - unless @ARGV == 2; +die "Usage: ezpz-admin-repl htpasswd-file [ezmlm-bindir list-base-dir]" + unless @ARGV == 1 or @ARGV == 3; { package Eval::WithLexicals::Scratchpad; @@ -13,8 +14,13 @@ die "Usage: ezpz-admin-repl ezmlm-bindir htpasswd-file" use vars qw($users); $users = App::EzPz::UserStore->new( - ezmlm_bindir => $ARGV[0], - htpasswd_file => $ARGV[1], + htpasswd_file => $ARGV[0], + (@ARGV > 1) + ? (ezmlm_config => { + bindir => $ARGV[1], + list_base_dir => $ARGV[2], + }) + : () ); }