1
0
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

Merge pull request #1296 from wstrm/ci-without-coreutils

Fallback for nproc for systems without GNU coreutils
This commit is contained in:
Michael Vetter 2020-04-01 15:01:50 +02:00 committed by GitHub
commit 15e05d1706
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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