From 5759c29ba5e0c8b2b1135e528e133dc7dde219f8 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 21 Jun 2020 00:21:33 +0000 Subject: init: add --skip-artnum parameter For archivists with only newer mail archives, this option allows reserving reserve NNTP article numbers for yet-to-be-archived old messages. Indexers will need to be updated to support this feature in future commits. -V1 inboxes will now be initialized with SQLite and Xapian support if this option is used, or if --indexlevel= is specified. --- script/public-inbox-init | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'script/public-inbox-init') diff --git a/script/public-inbox-init b/script/public-inbox-init index e8dcf4fc..c7f3da6f 100755 --- a/script/public-inbox-init +++ b/script/public-inbox-init @@ -24,14 +24,12 @@ use File::Path qw/mkpath/; use Fcntl qw(:DEFAULT); use Cwd qw/abs_path/; -my $version = undef; -my $indexlevel = undef; -my $skip_epoch; -my $jobs; +my ($version, $indexlevel, $skip_epoch, $skip_artnum, $jobs); my %opts = ( 'V|version=i' => \$version, 'L|indexlevel=s' => \$indexlevel, 'S|skip|skip-epoch=i' => \$skip_epoch, + 'N|skip-artnum=i' => \$skip_artnum, 'j|jobs=i' => \$jobs, ); GetOptions(%opts) or usage(); @@ -152,7 +150,8 @@ if (defined $jobs) { $creat_opt->{nproc} = $jobs; } -PublicInbox::InboxWritable->new($ibx, $creat_opt)->init_inbox(0, $skip_epoch); +$ibx = PublicInbox::InboxWritable->new($ibx, $creat_opt); +$ibx->init_inbox(0, $skip_epoch, $skip_artnum); # needed for git prior to v2.1.0 umask(0077) if defined $perm; -- cgit v1.2.3-24-ge0c7