Skip to content

Commit

Permalink
Add macos-compatible nproc alternative
Browse files Browse the repository at this point in the history
Without this we were running `make -j` on macos which is a minor fork
bomb.  Also adds a workaround in case that doesn't work either to fall
back to just -j1.
  • Loading branch information
jagerman committed Oct 6, 2023
1 parent 0548e1f commit 6c4e38c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/static-bundle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ cmake -G 'Unix Makefiles' \
"$@" \
"$projdir"

make -j${JOBS:-$(nproc)} VERBOSE=1 session-util
make -j${JOBS:-$(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 1)} VERBOSE=1 session-util

if [ -z "$archive" ]; then
exit 0
Expand Down

0 comments on commit 6c4e38c

Please sign in to comment.