forked from github/server
fix build script jobs determination on mac
This commit is contained in:
parent
38145cd57c
commit
61a1cfa141
9
s/build
9
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`
|
||||
|
|
Loading…
Reference in New Issue