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
[ -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`