diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:19:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2018-11-07 12:20:17 +0000 |
commit | a64a253794ac64cb40befee54db53bde17dd0d49 (patch) | |
tree | c1024acc5f6e508814b944d99f112259bb28b1be /cppcheck.sh | |
parent | New upstream version 1.10.0+dfsg (diff) | |
download | netdata-a64a253794ac64cb40befee54db53bde17dd0d49.tar.xz netdata-a64a253794ac64cb40befee54db53bde17dd0d49.zip |
New upstream version 1.11.0+dfsgupstream/1.11.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'cppcheck.sh')
-rwxr-xr-x | cppcheck.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/cppcheck.sh b/cppcheck.sh index 841f01d26..ebbeeaf8f 100755 --- a/cppcheck.sh +++ b/cppcheck.sh @@ -2,25 +2,24 @@ # echo >>/tmp/cppcheck.log "cppcheck ${*}" +# shellcheck disable=SC2230 cppcheck=$(which cppcheck 2>/dev/null || command -v cppcheck 2>/dev/null) [ -z "${cppcheck}" ] && echo >&2 "install cppcheck." && exit 1 -[ -x "/home/costa/src/cppcheck.git/cppcheck" ] && \ - cppcheck="/home/costa/src/cppcheck.git/cppcheck" - processors=$(grep -c ^processor /proc/cpuinfo) [ $(( processors )) -lt 1 ] && processors=1 base="$(dirname "${0}")" [ "${base}" = "." ] && base="${PWD}" -cd "${base}/src" || exit 1 +cd "${base}" || exit 1 [ ! -d "cppcheck-build" ] && mkdir "cppcheck-build" file="${1}" shift -[ "${file}" = "${base}" -o -z "${file}" ] && file="${base}/src" +# shellcheck disable=SC2235 +([ "${file}" = "${base}" ] || [ -z "${file}" ]) && file="${base}" "${cppcheck}" \ -j ${processors} \ |