From 7ab414b83d642acdb30f478077c62d5ffbb7ce52 Mon Sep 17 00:00:00 2001 From: maneamarius Date: Wed, 25 May 2022 19:43:48 +0300 Subject: Autodetect coverity install path to increase robustness (#12995) --- coverity-scan.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'coverity-scan.sh') 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 -- cgit v1.2.3