detect core number with sysctl on Darwin

This commit is contained in:
Lephenixnoir 2022-02-18 08:57:22 +01:00
parent b9b571d73c
commit e50b17396a
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)