X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=scripts%2Fimport_vger_from_mbox;h=d1ce723162e47686647cd26a690a9df60e4c9933;hb=46742d95647c7a80cb2f60d5c134717dd91e22e2;hp=b2dd5b3ab471c8da2d81dc5e7c2ff8144ba7c70e;hpb=9bd675d33ad1e49bd2ebe12a1d216216e61380de;p=public-inbox.git
diff --git a/scripts/import_vger_from_mbox b/scripts/import_vger_from_mbox
index b2dd5b3a..d1ce7231 100644
--- a/scripts/import_vger_from_mbox
+++ b/scripts/import_vger_from_mbox
@@ -1,21 +1,20 @@
#!/usr/bin/perl -w
-# Copyright (C) 2016-2019 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::Import;
-use PublicInbox::MDA;
my $usage = "usage: $0 NAME EMAIL DIR \$dry_run,
'V|version=i' => \$version,
'F|format=s' => \$variant,
+ 'filter=s' => \$filter,
);
GetOptions(%opts) or die $usage;
if ($variant ne 'mboxrd' && $variant ne 'mboxo') {
@@ -23,13 +22,13 @@ if ($variant ne 'mboxrd' && $variant ne 'mboxo') {
}
my $name = shift or die $usage; # git
my $email = shift or die $usage; # git@vger.kernel.org
-my $mainrepo = shift or die $usage; # /path/to/v2/repo
+my $inboxdir = shift or die $usage; # /path/to/v2/repo
my $ibx = {
- mainrepo => $mainrepo,
+ inboxdir => $inboxdir,
name => $name,
version => $version,
address => [ $email ],
- filter => 'PublicInbox::Filter::Vger',
+ filter => $filter,
};
$ibx = PublicInbox::Inbox->new($ibx);
unless ($dry_run) {
@@ -37,7 +36,7 @@ unless ($dry_run) {
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);