From 61a1cfa141be9eb881d330c1e4df3cfb19bbdc4b Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 31 Aug 2016 09:50:28 +0200 Subject: [PATCH] fix build script jobs determination on mac --- s/build | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/s/build b/s/build index ea0f5f3d0..1d580a349 100755 --- a/s/build +++ b/s/build @@ -5,8 +5,13 @@ while [ ! -d $ROOT/.git ]; do done [ -z "$BUILD" ] && BUILD=Debug - -[ -z "$JOBS" ] && [ "" != "which nproc" ] && JOBS=`nproc` +if [ -z "$JOBS" ] ; then + if [ -e /usr/sbin/sysctl ]; then + JOBS=`sysctl -n hw.ncpu` + else + JOBS=`nproc` + fi +fi DISTCC=`which distcc` if [ ! -z "$DISTCC" ] ; then JOBS=`distcc -j`