fix build script jobs determination on mac

This commit is contained in:
Enno Rehling 2016-08-31 09:50:28 +02:00
parent 38145cd57c
commit 61a1cfa141
1 changed files with 7 additions and 2 deletions

View File

@ -5,8 +5,13 @@ while [ ! -d $ROOT/.git ]; do
done done
[ -z "$BUILD" ] && BUILD=Debug [ -z "$BUILD" ] && BUILD=Debug
if [ -z "$JOBS" ] ; then
[ -z "$JOBS" ] && [ "" != "which nproc" ] && JOBS=`nproc` if [ -e /usr/sbin/sysctl ]; then
JOBS=`sysctl -n hw.ncpu`
else
JOBS=`nproc`
fi
fi
DISTCC=`which distcc` DISTCC=`which distcc`
if [ ! -z "$DISTCC" ] ; then if [ ! -z "$DISTCC" ] ; then
JOBS=`distcc -j` JOBS=`distcc -j`