Use nproc and sysctl -n hw.cpu for default initializing CORES

This avoids having to pass --build-arg CORES=n when building the
docker images.
This commit is contained in:
Martin Storsjö committed 2018-11-09 22:20:34 +02:00
1 parent e0f186967a
commit 99e2fefc9d
9 files changed
+13 -7

No files matched your search

+2
View File
@@ -9,6 +9,8 @@ fi
PREFIX="$1"
export PATH=$PREFIX/bin:$PATH
: ${CORES:=$(nproc 2>/dev/null)}
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
: ${CORES:=4}
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}