From 30bae92900289b3430bba3a223c39c44ee5d6f7d Mon Sep 17 00:00:00 2001 From: Daniel Bye Date: Wed, 19 Feb 2014 12:05:31 +0000 Subject: [PATCH] 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 --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 9dfed61a4..9a48a9772 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -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