X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=script%2Fpublic-inbox-clone;h=59f01b5491309387e05ee18c3af0412975bd3880;hb=d7833606ed1577dacb509d3dbac893af86e786f1;hp=0efde1a8499572092ce821e1d49098d2fd6c298b;hpb=7d2f9f7caf63256bab7b3342c52a1d97c889ada4;p=public-inbox.git diff --git a/script/public-inbox-clone b/script/public-inbox-clone index 0efde1a8..59f01b54 100755 --- a/script/public-inbox-clone +++ b/script/public-inbox-clone @@ -13,15 +13,19 @@ usage: public-inbox-clone INBOX_URL [DESTINATION] options: + --epoch=RANGE range of v2 epochs to clone (e.g `2..5', `~0', `~1..') + --objstore [DIR] share storage for coderepos --torsocks VAL whether or not to wrap git and curl commands with torsocks (default: `auto') Must be one of: `auto', `no' or `yes' + --dry-run | -n show what would be cloned without cloning --verbose | -v increase verbosity (may be repeated) --quiet | -q increase verbosity (may be repeated) -C DIR chdir to specified directory EOF -GetOptions($opt, qw(help|h quiet|q verbose|v+ C=s@ c=s@ - no-torsocks torsocks=s)) or die $help; +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 + 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 PublicInbox::Admin::do_chdir(delete $opt->{C}); @@ -53,6 +57,9 @@ my $mrr = bless { src => $url, dst => $dst, }, 'PublicInbox::LeiMirror'; + +$? = 0; +$mrr->{dry_run} = 1 if $lei->{opt}->{'dry-run'}; $mrr->do_mirror; $mrr->can('_wq_done_wait')->([$mrr, $lei], $$); exit(($lei->{child_error} // 0) >> 8);