]> Sergey Matveev's repositories - public-inbox.git/blob - script/public-inbox-gcf2
add gcf2 client and executable script
[public-inbox.git] / script / public-inbox-gcf2
1 #!perl -w
2 # Copyright (C) 2020 all contributors <meta@public-inbox.org>
3 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 eval { require PublicInbox::Gcf2 };
5 die "libgit2 development package or Inline::C missing for $0: $@\n" if $@;
6 my $gcf2 = PublicInbox::Gcf2::new();
7 while (<STDIN>) {
8         chomp;
9         if (m!\A/!) { # +/path/to/git-dir
10                 $gcf2->add_alternate("$_/objects");
11         } else {
12                 $gcf2->cat_oid(1, $_);
13         }
14 }