summaryrefslogtreecommitdiffstats
path: root/coverity-scan.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xcoverity-scan.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/coverity-scan.sh b/coverity-scan.sh
index 8ea433453..46a0c809e 100755
--- a/coverity-scan.sh
+++ b/coverity-scan.sh
@@ -1,5 +1,8 @@
#/bin/bash
+cpus=$(grep ^processor </proc/cpuinfo| wc -l)
+[ -z "${cpus}" ] && cpus=1
+
token=
[ -f .coverity-token ] && token="$(<.coverity-token)"
[ -z "${token}" ] && \
@@ -30,7 +33,7 @@ make clean || exit 1
[ -f netdata-coverity-analysis.tgz ] && \
rm netdata-coverity-analysis.tgz
-"${covbuild}" --dir cov-int make -j4 || exit 1
+"${covbuild}" --dir cov-int make -j${cpus} || exit 1
tar czvf netdata-coverity-analysis.tgz cov-int || exit 1