diff options
author | Eric Wong <e@80x24.org> | 2021-09-15 21:35:59 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-09-15 23:14:55 +0000 |
commit | add90b9504f4217af5e35b3be7e326b8c6419647 (patch) | |
tree | a324dd2f4f36d849dff752fcadd2ba82e93e7297 /script/public-inbox-index | |
parent | 5a5d2496f139e45823dbee3361ab790b2db4d31f (diff) | |
download | public-inbox-add90b9504f4217af5e35b3be7e326b8c6419647.tar.gz |
Because make(1), git(1), tar(1) all support -C in this form, as do our newer commands such as lei, public-inbox-{clone,fetch}.
Diffstat (limited to 'script/public-inbox-index')
-rwxr-xr-x | script/public-inbox-index | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/script/public-inbox-index b/script/public-inbox-index index 0034d44c..ca190a2e 100755 --- a/script/public-inbox-index +++ b/script/public-inbox-index @@ -42,7 +42,7 @@ GetOptions($opt, qw(verbose|v+ reindex rethread compact|c+ jobs|j=i prune batch_size|batch-size=s sequential-shard|seq-shard no-update-extindex update-extindex|E=s@ - fast-noop|F skip-docdata all help|h)) + fast-noop|F skip-docdata all C=s@ help|h)) or die $help; if ($opt->{help}) { print $help; exit 0 }; die "--jobs must be >= 0\n" if defined $opt->{jobs} && $opt->{jobs} < 0; @@ -56,6 +56,7 @@ if ($opt->{reindex} && delete($opt->{'fast-noop'})) { # require lazily to speed up --help require PublicInbox::Admin; PublicInbox::Admin::require_or_die('-index'); +PublicInbox::Admin::do_chdir(delete $opt->{C}); my $cfg = PublicInbox::Config->new; # Config is loaded by Admin $opt->{-use_cwd} = 1; |