diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-04-02 23:59:55 +0200 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-04-02 23:59:55 +0200 |
commit | c57bd566557558fc94c306b0a8f7e3c5ad5b4d9c (patch) | |
tree | 3221467161d77cd85218163c5f964865d3787a54 | |
parent | df23c3461171053ac359bfebfd68656c6ad1b29b (diff) | |
parent | 15e05d1706cc3cdc3d637e25ed83f6acbd26b59e (diff) | |
download | profani-tty-c57bd566557558fc94c306b0a8f7e3c5ad5b4d9c.tar.gz |
Merge branch 'master' of github.com:profanity-im/profanity
-rwxr-xr-x | ci-build.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/ci-build.sh b/ci-build.sh index 438388b0..0a42e099 100755 --- a/ci-build.sh +++ b/ci-build.sh @@ -11,10 +11,21 @@ error_handler() trap error_handler ERR +num_cores() +{ + # Check for cores, for systems with: + # Line 1. Linux w/ coreutils, or... + # Line 2. OpenBSD, FreeBSD, NetBSD or macOS, or... + # Line 3. Fallback for Linux w/o coreutils (glibc). + nproc \ + || sysctl -n hw.ncpu \ + || getconf _NPROCESSORS_ONLN 2>/dev/null +} + ./bootstrap.sh tests=() -MAKE="make --quiet -j$(nproc)" +MAKE="make --quiet -j$(num_cores)" CC="gcc" case $(uname | tr '[:upper:]' '[:lower:]') in |