diff --git a/build_editor.sh b/build_editor.sh index 1545f994..5aab6187 100755 --- a/build_editor.sh +++ b/build_editor.sh @@ -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 - BUILD_PROC=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 diff --git a/build_engine.sh b/build_engine.sh index 66a520a3..f6fbc39b 100755 --- a/build_engine.sh +++ b/build_engine.sh @@ -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 - BUILD_PROC=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