mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-13 03:01:32 +01:00
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:
parent
861290e40b
commit
30bae92900
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@ bi() {
|
||||||
if _bundler-installed && _within-bundled-project; then
|
if _bundler-installed && _within-bundled-project; then
|
||||||
local bundler_version=`bundle version | cut -d' ' -f3`
|
local bundler_version=`bundle version | cut -d' ' -f3`
|
||||||
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
|
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
|
||||||
if [[ "$(uname)" == 'Darwin' ]]
|
if [[ "$(uname)" == 'Darwin' || "$(uname)" == 'FreeBSD' ]]
|
||||||
then
|
then
|
||||||
local cores_num="$(sysctl hw.ncpu | awk '{print $2}')"
|
local cores_num="$(sysctl hw.ncpu | awk '{print $2}')"
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue