From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 065E22022D; Fri, 4 Nov 2016 21:11:37 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Cc: Eric Wong Subject: [PATCH] index: allow indexing before configuration Date: Fri, 4 Nov 2016 21:11:35 +0000 Message-Id: <20161104211135.11436-1-e@80x24.org> List-Id: One may build the initial index on a powerful host and transfer it to a weaker one for incremental indexing. Thus there is no requirement to have a configured public-inbox for building the index unless a user needs altid support or some such. --- script/public-inbox-index | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/script/public-inbox-index b/script/public-inbox-index index 1431b99..e9bbec9 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -12,7 +12,10 @@ use Getopt::Long qw(:config gnu_getopt no_ignore_case auto_abbrev); use Cwd 'abs_path'; my $usage = "public-inbox-index GIT_DIR"; use PublicInbox::Config; -my $config = PublicInbox::Config->new; +my $config = eval { PublicInbox::Config->new } || eval { + warn "public-inbox unconfigured for serving, indexing anyways...\n"; + {} +}; eval { require PublicInbox::SearchIdx }; if ($@) { print STDERR "Search::Xapian required for $0\n"; -- EW