diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-08-07 22:11:30 +0200 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2020-08-07 22:18:41 +0200 |
commit | adce547e132a6f12cf3c3a552df6102244a970cb (patch) | |
tree | 4dfcc235c52cbc508c976a711dfb5abb8e2a7b30 | |
parent | d7bbf8a477c2511e5dbd96a438c838228579ede8 (diff) | |
download | rockbox-adce547.tar.gz rockbox-adce547.zip |
rockboxdev: Make it work on macOS.
macOS doesn't know about nproc; sysctl is the tool to be used on macOS.
Change-Id: Ic7dcf9be51d7ef7b52394ebb2a4df1dc3e31097b
-rwxr-xr-x | tools/rockboxdev.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/rockboxdev.sh b/tools/rockboxdev.sh index bf50faf214..6009a0c3af 100755 --- a/tools/rockboxdev.sh +++ b/tools/rockboxdev.sh @@ -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 |