X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=scripts%2Fimport_vger_from_mbox;h=0e5ba6b47b73fc0994f99f1dab6669329d74cd28;hb=95bdac7f09c69036efed537a4d03d5bdd2ae4eb6;hp=369dac79824a30b73a5d6cac836c3194f17f946e;hpb=54590383027a67d11953690cbb6390347757730b;p=public-inbox.git diff --git a/scripts/import_vger_from_mbox b/scripts/import_vger_from_mbox index 369dac79..0e5ba6b4 100644 --- a/scripts/import_vger_from_mbox +++ b/scripts/import_vger_from_mbox @@ -1,12 +1,11 @@ #!/usr/bin/perl -w -# Copyright (C) 2016-2018 all contributors +# Copyright (C) 2016-2020 all contributors # License: AGPL-3.0+ use strict; use warnings; use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/; use PublicInbox::MIME; use PublicInbox::InboxWritable; -use PublicInbox::V2Writable; use PublicInbox::Import; use PublicInbox::MDA; my $usage = "usage: $0 NAME EMAIL DIR $mainrepo, + inboxdir => $inboxdir, name => $name, version => $version, - -primary_address => $email, + address => [ $email ], filter => 'PublicInbox::Filter::Vger', }; $ibx = PublicInbox::Inbox->new($ibx); unless ($dry_run) { if ($version >= 2) { + require PublicInbox::V2Writable; PublicInbox::V2Writable->new($ibx, 1)->init_inbox(0); } else { - system(qw(git init --bare -q), $mainrepo) == 0 or die; + system(qw(git init --bare -q), $inboxdir) == 0 or die; } } $ibx = PublicInbox::InboxWritable->new($ibx);