build_engine/editor.sh: Use sysctl on OpenBSD to get number of cores.
This commit is contained in:
parent
29e0e82f48
commit
1de7864463
2 changed files with 12 additions and 4 deletions
|
@ -14,8 +14,12 @@ COMPILE_SYS=$(uname)
|
|||
|
||||
# Check how many cores/processors we should use for building
|
||||
if ! [ -x "$(command -v nproc)" ]; then
|
||||
# nproc doesn't exist, so make a safe assumption of having at least 1
|
||||
# check if we're on OpenBSD then
|
||||
if ! [ -x "$(command -v sysctl)" ]; then
|
||||
BUILD_PROC=1
|
||||
else
|
||||
BUILD_PROC=$(sysctl -n hw.ncpu)
|
||||
fi
|
||||
else
|
||||
BUILD_PROC=$(nproc)
|
||||
fi
|
||||
|
|
|
@ -8,8 +8,12 @@ COMPILE_SYS=$(uname)
|
|||
|
||||
# Check how many cores/processors we should use for building
|
||||
if ! [ -x "$(command -v nproc)" ]; then
|
||||
# nproc doesn't exist, so make a safe assumption of having at least 1
|
||||
# check if we're on OpenBSD then
|
||||
if ! [ -x "$(command -v sysctl)" ]; then
|
||||
BUILD_PROC=1
|
||||
else
|
||||
BUILD_PROC=$(sysctl -n hw.ncpu)
|
||||
fi
|
||||
else
|
||||
BUILD_PROC=$(nproc)
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue