make.sh: Add function to determine how many CPU cores the build host has

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2017-11-07 15:25:11 +01:00
parent 7e1639a481
commit 1445a5ac43
2 changed files with 5 additions and 4 deletions

View File

@@ -60,6 +60,10 @@ WARN="\\033[1;35m"
FAIL="\\033[1;31m"
NORMAL="\\033[0;39m"
system_processors() {
getconf _NPROCESSORS_ONLN 2>/dev/null || echo "1"
}
system_memory() {
local key val unit