forked from len0rd/rockbox
rockboxdev: Make it work on macOS.
macOS doesn't know about nproc; sysctl is the tool to be used on macOS. Change-Id: Ic7dcf9be51d7ef7b52394ebb2a4df1dc3e31097b
This commit is contained in:
parent
d7bbf8a477
commit
adce547e13
1 changed files with 6 additions and 1 deletions
|
|
@ -32,7 +32,12 @@ fi
|
||||||
# This is the absolute path to where the script resides.
|
# This is the absolute path to where the script resides.
|
||||||
rockboxdevdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
rockboxdevdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
if [ `uname -s` = "Darwin" ]; then
|
||||||
|
parallel=`sysctl -n hw.physicalcpu`
|
||||||
|
else
|
||||||
parallel=`nproc`
|
parallel=`nproc`
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $parallel -gt 1 ] ; then
|
if [ $parallel -gt 1 ] ; then
|
||||||
make_parallel=-j$parallel
|
make_parallel=-j$parallel
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue