detect core number with sysctl on Darwin

This commit is contained in:
Lephenixnoir 2022-02-18 08:56:31 +01:00
parent 0456a420af
commit 2fec1bf08b
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ source util.sh
cd build
# Number of processor cores
if [[ $(uname) == "OpenBSD" ]]; then
if [[ $(uname) == "OpenBSD" || $(uname) == "Darwin" ]]; then
cores=$(sysctl -n hw.ncpu)
else
cores=$(nproc)