mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Fallback for nproc for systems without GNU coreutils
This commit is contained in:
parent
7eec3107fc
commit
06f8299e7c
13
ci-build.sh
13
ci-build.sh
@ -11,10 +11,21 @@ error_handler()
|
|||||||
|
|
||||||
trap error_handler ERR
|
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
|
./bootstrap.sh
|
||||||
|
|
||||||
tests=()
|
tests=()
|
||||||
MAKE="make --quiet -j$(nproc)"
|
MAKE="make --quiet -j$(num_cores)"
|
||||||
CC="gcc"
|
CC="gcc"
|
||||||
|
|
||||||
case $(uname | tr '[:upper:]' '[:lower:]') in
|
case $(uname | tr '[:upper:]' '[:lower:]') in
|
||||||
|
Loading…
Reference in New Issue
Block a user