Unverified Commit be5bff2e authored by Marc Cornellà's avatar Marc Cornellà Committed by GitHub
Browse files

Allow FreeBSD to correctly detect number of CPUs



Use the same scheme as Darwin - sysctl instead of nproc, which doesn't exist in FreeBSD

Closes #2545
Co-authored-by: default avatarDaniel Bye <dbye@users.noreply.github.com>
parent 7a9bab1d
...@@ -57,7 +57,7 @@ bundle_install() { ...@@ -57,7 +57,7 @@ bundle_install() {
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 [[ "$OSTYPE" = darwin* ]] if [[ "$OSTYPE" = (darwin|freebsd)* ]]
then then
local cores_num="$(sysctl -n hw.ncpu)" local cores_num="$(sysctl -n hw.ncpu)"
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment