From 99de2a2a15d5f7e2add891d2574667d840077ae4 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Fri, 19 Feb 2021 11:26:31 +0100 Subject: [PATCH] easy-builder: get number of cpus on macOS a better way --- easy-builder | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easy-builder b/easy-builder index 845d2c7c..4dbb393f 100755 --- a/easy-builder +++ b/easy-builder @@ -25,9 +25,13 @@ _nproc () { 'Linux') egrep "^processor" /proc/cpuinfo | wc -l ;; - 'FreeBSD'|'Darwin') + 'FreeBSD') sysctl -n hw.ncpu ;; + 'Darwin') + sysctl -n hw.logicalcpu \ + || sysctl -n hw.ncpu + ;; 'MSYS_NT-'*|'CYGWIN_NT-'*|'MINGW'*'_NT-'*) if command -v 'wmic' >/dev/null then -- 2.39.2