diff options
author | maneamarius <locomotion.itservices@gmail.com> | 2022-05-25 19:43:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-25 19:43:48 +0300 |
commit | 7ab414b83d642acdb30f478077c62d5ffbb7ce52 (patch) | |
tree | a87bb21eb2b8d38b73abb22e684cca9a1477d0de /coverity-scan.sh | |
parent | 970261926283c5fcb615e3d24b22fe7fcc2a34f9 (diff) |
Autodetect coverity install path to increase robustness (#12995)
Diffstat (limited to 'coverity-scan.sh')
-rwxr-xr-x | coverity-scan.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/coverity-scan.sh b/coverity-scan.sh index a745b07dd3..0e4c311b86 100755 --- a/coverity-scan.sh +++ b/coverity-scan.sh @@ -87,7 +87,8 @@ debugrun() { scanit() { progress "Scanning using coverity" - export PATH="${PATH}:${INSTALL_DIR}/${COVERITY_BUILD_VERSION}/bin/" + COVERITY_PATH=$(find /opt/ -maxdepth 1 -name 'cov*linux*') + export PATH=${PATH}:${INSTALL_DIR}/${COVERITY_PATH}/bin/ covbuild="${COVERITY_BUILD_PATH}" [ -z "${covbuild}" ] && covbuild="$(which cov-build 2> /dev/null || command -v cov-build 2> /dev/null)" @@ -146,7 +147,8 @@ installit() { run sudo tar -z -x -f "${TMP_DIR}/${COVERITY_BUILD_VERSION}.tar.gz" || exit 1 rm "${TMP_DIR}/${COVERITY_BUILD_VERSION}.tar.gz" - export PATH=${PATH}:${INSTALL_DIR}/${COVERITY_BUILD_VERSION}/bin/ + COVERITY_PATH=$(find /opt/ -maxdepth 1 -name 'cov*linux*') + export PATH=${PATH}:${INSTALL_DIR}/${COVERITY_PATH}/bin/ elif find . -name "*.tar.gz" > /dev/null 2>&1; then fatal "Downloaded coverity tool tarball does not appear to be the version we were expecting, exiting." else |