diff options
author | Eric Wong <e@yhbt.net> | 2020-08-10 02:12:00 +0000 |
---|---|---|
committer | Eric Wong <e@yhbt.net> | 2020-08-10 06:26:21 +0000 |
commit | 6a7e3c6f870d0555184b68940eb373fa102d4102 (patch) | |
tree | a0b696867ad31baba92ad4af64b76ae5aec031ea /script/public-inbox-init | |
parent | 5fdedf809e7f236c7e50177bff8426a9befbcceb (diff) | |
download | public-inbox-6a7e3c6f870d0555184b68940eb373fa102d4102.tar.gz |
Move away from hard-to-read alllowercase naming and favor snake_case or separated-by-dashes. We'll keep `--indexlevel' as-is for now, since it's been around for several releases; but we'll support `--index-level' in the CLI and update our documentation in a few months. We'll also clarify that publicInbox.indexMaxSize is only intended for -index, and not -watch or -mda.
Diffstat (limited to 'script/public-inbox-init')
-rwxr-xr-x | script/public-inbox-init | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/script/public-inbox-init b/script/public-inbox-init index 6a959db7..1c8066df 100755 --- a/script/public-inbox-init +++ b/script/public-inbox-init @@ -27,7 +27,7 @@ use Cwd qw/abs_path/; my ($version, $indexlevel, $skip_epoch, $skip_artnum, $jobs); my %opts = ( 'V|version=i' => \$version, - 'L|indexlevel=s' => \$indexlevel, + 'L|index-level|indexlevel=s' => \$indexlevel, 'S|skip|skip-epoch=i' => \$skip_epoch, 'N|skip-artnum=i' => \$skip_artnum, 'j|jobs=i' => \$jobs, @@ -103,11 +103,7 @@ if (-e $pi_config) { exit(1) if $conflict; my $ibx = $cfg->lookup_name($name); - if ($ibx) { - if (!defined($indexlevel) && $ibx->{indexlevel}) { - $indexlevel = $ibx->{indexlevel}; - } - } + $indexlevel //= $ibx->{indexlevel} if $ibx; } my $pi_config_tmp = $fh->filename; close($fh) or die "failed to close $pi_config_tmp: $!\n"; |