--quiet | -q increase verbosity (may be repeated)
-C DIR chdir to specified directory
EOF
+
+# cgit calls it `project-list', grokmirror calls it `projectslist',
+# support both :/
GetOptions($opt, qw(help|h quiet|q verbose|v+ C=s@ c=s@ include|I=s@ exclude=s@
inbox-config=s inbox-version=i objstore=s manifest=s
+ project-list|projectslist=s post-update-hook=s@
+ prune|p keep-going|k exit-code
dry-run|n jobs|j=i no-torsocks torsocks=s epoch=s)) or die $help;
if ($opt->{help}) { print $help; exit };
require PublicInbox::Admin; # loads Config
index($dst, "\n") >= 0 and die "`\\n' not allowed in `$dst'";
# n.b. this is still a truckload of code...
+require File::Spec;
require PublicInbox::LEI;
require PublicInbox::LeiExternal;
require PublicInbox::LeiMirror;
my $mrr = bless {
lei => $lei,
src => $url,
- dst => $dst,
+ dst => File::Spec->canonpath($dst),
}, 'PublicInbox::LeiMirror';
$? = 0;
$mrr->do_mirror;
-$mrr->can('_wq_done_wait')->([$mrr, $lei], $$);
+$mrr->can('_wq_done_wait')->($$, $mrr, $lei);
exit(($lei->{child_error} // 0) >> 8);