Merge pull request #1055 from klimkjar/fix-illumos

Fix pyenv install on Solaris / Illumos
This commit is contained in:
Yamashita, Yuu 2017-12-15 19:01:19 +09:00 committed by GitHub
commit 69d47d5fd7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -155,6 +155,9 @@ num_cpu_cores() {
Darwin | *BSD )
num="$(sysctl -n hw.ncpu 2>/dev/null || true)"
;;
SunOS )
num="$(getconf NPROCESSORS_ONLN 2>/dev/null || true)"
;;
* )
num="$({ getconf _NPROCESSORS_ONLN ||
grep -c ^processor /proc/cpuinfo; } 2>/dev/null)"