Allow FreeBSD to correctly detect number of CPUs on host.

Use the same scheme as Darwin - sysctl instead of nproc, which doesn't exist in FreeBSD
This commit is contained in:
Daniel Bye 2014-02-19 12:05:31 +00:00
commit 30bae92900

View file

@ -19,7 +19,7 @@ bi() {
if _bundler-installed && _within-bundled-project; then
local bundler_version=`bundle version | cut -d' ' -f3`
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
if [[ "$(uname)" == 'Darwin' ]]
if [[ "$(uname)" == 'Darwin' || "$(uname)" == 'FreeBSD' ]]
then
local cores_num="$(sysctl hw.ncpu | awk '{print $2}')"
else