about summary refs log tree commit homepage
path: root/script
diff options
context:
space:
mode:
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-07 03:41:51 +0000
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>2018-04-07 03:42:28 +0000
commit768b3d926e92c4df2274b0167613574eae808f0d (patch)
tree9658c961121b15c2ce737c1f2a199c790890aef0 /script
parentdd80811bdaddc40520cb37abda23624674022e37 (diff)
downloadpublic-inbox-768b3d926e92c4df2274b0167613574eae808f0d.tar.gz
Not everybody needs multiprocess support.
Diffstat (limited to 'script')
-rwxr-xr-xscript/public-inbox-index6
1 files changed, 3 insertions, 3 deletions
diff --git a/script/public-inbox-index b/script/public-inbox-index
index 73f88ac6..db7ebbab 100755
--- a/script/public-inbox-index
+++ b/script/public-inbox-index
@@ -31,7 +31,7 @@ my %opts = (
         '--prune' => \$prune,
 );
 GetOptions(%opts) or die "bad command-line args\n$usage";
-die "--jobs must be positive\n" if defined $jobs && $jobs <= 0;
+die "--jobs must be positive\n" if defined $jobs && $jobs < 0;
 
 my @dirs;
 
@@ -101,11 +101,11 @@ sub index_dir {
                 eval { require PublicInbox::V2Writable };
                 die "v2 requirements not met: $@\n" if $@;
                 my $v2w = eval {
-                        local $ENV{NPROC} = $jobs;
+                        local $ENV{NPROC} = $jobs if $jobs;
                         PublicInbox::V2Writable->new($repo);
                 };
                 if (defined $jobs) {
-                        if ($jobs == 1) {
+                        if ($jobs == 0) {
                                 $v2w->{parallel} = 0;
                         } else {
                                 my $n = $v2w->{partitions};