2 # Copyright (C) 2015, all contributors (git clone git://80x24.org/public-inbox)
3 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
4 # Basic tool to create a Xapian search index for a git repository
5 # configured for public-inbox.
6 # Usage with libeatmydata <https://www.flamingspork.com/projects/libeatmydata/>
7 # highly recommended: eatmydata public-inbox-index GIT_DIR
11 my $usage = "public-inbox-index GIT_DIR";
12 use PublicInbox::Config;
13 eval { require PublicInbox::SearchIdx };
15 print STDERR "Search::Xapian required for $0\n";
19 sub usage { print STDERR "Usage: $usage\n"; exit 1 }
22 foreach my $dir (@ARGV) {
28 -d $git_dir or die "$git_dir does not appear to be a git repository\n";
29 my $s = PublicInbox::SearchIdx->new($git_dir, 1);