summaryrefslogtreecommitdiffstats
path: root/packaging/installer
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/installer')
-rw-r--r--packaging/installer/functions.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/packaging/installer/functions.sh b/packaging/installer/functions.sh
index 8680b3f4c5..af8e08022a 100644
--- a/packaging/installer/functions.sh
+++ b/packaging/installer/functions.sh
@@ -202,6 +202,11 @@ safe_pidof() {
# -----------------------------------------------------------------------------
find_processors() {
+ # Most UNIX systems have `nproc` as part of their userland (including macOS, Linux and BSD)
+ if command -v nproc > /dev/null; then
+ nproc && return
+ fi
+
local cpus
if [ -f "/proc/cpuinfo" ]; then
# linux