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:
Dominik Riebeling 2020-08-07 22:11:30 +02:00
parent d7bbf8a477
commit adce547e13

View file

@ -32,7 +32,12 @@ fi
# This is the absolute path to where the script resides.
rockboxdevdir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
parallel=`nproc`
if [ `uname -s` = "Darwin" ]; then
parallel=`sysctl -n hw.physicalcpu`
else
parallel=`nproc`
fi
if [ $parallel -gt 1 ] ; then
make_parallel=-j$parallel
fi