mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
b08b92248b
Now `mmake o/ape/ape.elf` works.
18 lines
270 B
Text
18 lines
270 B
Text
[[ -x $(whence -p nproc) ]] && {
|
|
command nproc && {
|
|
unfunction nproc
|
|
return
|
|
}
|
|
}
|
|
[[ -x $(which sysctl) ]] && {
|
|
nproc() {
|
|
sysctl -n hw.ncpu
|
|
}
|
|
nproc && return
|
|
}
|
|
# TODO other platforms
|
|
echo nproc: no implementation found >&2
|
|
nproc() {
|
|
echo 2
|
|
}
|
|
nproc
|