Commit 6d6725a8 by Kjetil Limkjær

Fix rbenv install on Solaris / Illumos

rbenv install crashes on Solaris with an empty log file. Adding support
for the proper Solaris getconf call in num_cpu_cores fixed it. Tested
and working under OmniOS CE r151024.
parent 81a4cd64
...@@ -153,6 +153,9 @@ num_cpu_cores() { ...@@ -153,6 +153,9 @@ num_cpu_cores() {
Darwin | *BSD ) Darwin | *BSD )
num="$(sysctl -n hw.ncpu 2>/dev/null || true)" num="$(sysctl -n hw.ncpu 2>/dev/null || true)"
;; ;;
SunOS )
num="$(getconf NPROCESSORS_ONLN 2>/dev/null || true)"
;;
* ) * )
num="$({ getconf _NPROCESSORS_ONLN || num="$({ getconf _NPROCESSORS_ONLN ||
grep -c ^processor /proc/cpuinfo; } 2>/dev/null)" grep -c ^processor /proc/cpuinfo; } 2>/dev/null)"
......
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