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
|
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`
|
||||||
|
|
Loading…
Reference in New Issue