install_update_dovecot-2.4.sh: change calculation of numbers of cpus.

This commit is contained in:
2026-02-02 11:47:33 +01:00
parent b32555f66c
commit 74702b3d41

View File

@@ -2361,7 +2361,13 @@ done
## - Let make use multiple cores (-j<number of cores +1>) ## - Let make use multiple cores (-j<number of cores +1>)
## - ## -
export MAKEFLAGS=-j$(expr `grep "^processor" /proc/cpuinfo | sort -u | wc -l` - 1) #export MAKEFLAGS=-j$(expr `grep "^processor" /proc/cpuinfo | sort -u | wc -l` - 1)
CPUS=$(nproc)
if (( CPUS > 1 )); then
export MAKEFLAGS="-j$((CPUS - 1))"
else
export MAKEFLAGS="-j1"
fi
# ------------- # -------------