Idris2/tests/base/system_info001/run
Johann Rudloff 2477d060a8 Use sysctl instead of nproc to get number of processors on FreeBSD
On FreeBSD `nproc` is not available in a standard installation, so the
equivalent `sysctl -n hw.ncpu` is used.
2021-05-13 18:27:57 +01:00

11 lines
240 B
Plaintext
Executable File

rm -f expected
if [ "FreeBSD" = "$(uname)" ]; then
echo "$(sysctl -n hw.ncpu) processors" > expected
else
echo "$(nproc) processors" > expected
fi
$1 --no-banner --no-color --console-width 0 NumProcessors.idr --exec main
rm -rf build