about summary refs log tree commit homepage
path: root/script/public-inbox-init
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-06-21 00:21:33 +0000
committerEric Wong <e@yhbt.net>2020-06-23 00:22:18 +0000
commit5759c29ba5e0c8b2b1135e528e133dc7dde219f8 (patch)
tree841e315a7c4c54910bcc72868f4eb92a51fcc092 /script/public-inbox-init
parent3ba0028804c50b75b1854d0c2bf637ebce0aa8b1 (diff)
downloadpublic-inbox-5759c29ba5e0c8b2b1135e528e133dc7dde219f8.tar.gz
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.
Diffstat (limited to 'script/public-inbox-init')
-rwxr-xr-xscript/public-inbox-init9
1 files changed, 4 insertions, 5 deletions
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;