summaryrefslogtreecommitdiff
path: root/run-cppcheck.sh
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2016-01-21 19:03:31 (GMT)
committerKamil Rytarowski <n54@gmx.com>2016-01-21 19:43:59 (GMT)
commit5998f75a480eca0651051374a4e6c712bae830f8 (patch)
tree290700a1f0578c6aa629cbc06371f85c178b9e9d /run-cppcheck.sh
parent9a43c440f840a0bf89ba2c2efb9d6fd5baaf8dea (diff)
downloadcoreclr-5998f75a480eca0651051374a4e6c712bae830f8.zip
coreclr-5998f75a480eca0651051374a4e6c712bae830f8.tar.gz
coreclr-5998f75a480eca0651051374a4e6c712bae830f8.tar.bz2
NetBSD: Add support for retrieving the number of available CPUs
$ uname NetBSD $ getconf NPROCESSORS_ONLN 2 $ getconf _NPROCESSORS_ONLN getconf: _NPROCESSORS_ONLN: unknown variable
Diffstat (limited to 'run-cppcheck.sh')
-rwxr-xr-xrun-cppcheck.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/run-cppcheck.sh b/run-cppcheck.sh
index 6888468..c505fd1 100755
--- a/run-cppcheck.sh
+++ b/run-cppcheck.sh
@@ -41,6 +41,8 @@ SloccountOutput="sloccount.sc"
# processors available to a single process.
if [ `uname` = "FreeBSD" ]; then
NumProc=`sysctl hw.ncpu | awk '{ print $2+1 }'`
+elif [ `uname` = "NetBSD" ]; then
+NumProc=$(($(getconf NPROCESSORS_ONLN)+1))
else
NumProc=$(($(getconf _NPROCESSORS_ONLN)+1))
fi
@@ -114,4 +116,4 @@ then
fi
echo Check finished. Results can be found in: $CppCheckOutputs $SlocCountOutputs
-exit 0 \ No newline at end of file
+exit 0