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
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

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)