isaacs/nave — pull request #35 by seebees (2012-04-11 00:39:48+00:00)
Title: as many jobs as CPU's

if sysctl does not have a value for hw.ncpu it should return null, which is a valid value for -j

And if sysctl does not exist then the value should evaluate to null and something would pop out on stderr, but again -j should be happy.

I do not have a plethora of OS's to test on, so I only tested on lion. But... I did run the following:

$(sysctl -n hw.ncpu)
$(sysctl -n doesNotExist)
$(doesNotExist -n hw.ncpu)

And each one worked for me...