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 use PublicInbox::Search;
14 use PublicInbox::GitCatFile;
16 sub usage { print STDERR "Usage: $usage\n"; exit 1 }
18 foreach my $dir (@ARGV) {
25 -d $git_dir or die "$git_dir does not appear to be a git repository\n";
26 my $git = PublicInbox::GitCatFile->new($git_dir);
27 my $s = PublicInbox::Search->new($git_dir, 1);