Autodetect coverity install path to increase robustness (#12995)
maneamarius committed
May 25, 2022 at 19:43 UTC
7ab414b83d642acdb30f478077c62d5ffbb7ce52
1 file changed
+4
-2
coverity-scan.sh
+4
-2
@@ -87,7 +87,8 @@ debugrun() {
87
88
scanit() {
89
progress "Scanning using coverity"
90
- export PATH="${PATH}:${INSTALL_DIR}/${COVERITY_BUILD_VERSION}/bin/"
90
+ COVERITY_PATH=$(find /opt/ -maxdepth 1 -name 'cov*linux*')
91
+ export PATH=${PATH}:${INSTALL_DIR}/${COVERITY_PATH}/bin/
92
covbuild="${COVERITY_BUILD_PATH}"
93
[ -z "${covbuild}" ] && covbuild="$(which cov-build 2> /dev/null || command -v cov-build 2> /dev/null)"
94
@@ -146,7 +147,8 @@ installit() {
147
148
run sudo tar -z -x -f "${TMP_DIR}/${COVERITY_BUILD_VERSION}.tar.gz" || exit 1
149
rm "${TMP_DIR}/${COVERITY_BUILD_VERSION}.tar.gz"
149
- export PATH=${PATH}:${INSTALL_DIR}/${COVERITY_BUILD_VERSION}/bin/
150
+ COVERITY_PATH=$(find /opt/ -maxdepth 1 -name 'cov*linux*')
151
+ export PATH=${PATH}:${INSTALL_DIR}/${COVERITY_PATH}/bin/
152
elif find . -name "*.tar.gz" > /dev/null 2>&1; then
153
fatal "Downloaded coverity tool tarball does not appear to be the version we were expecting, exiting."
154
else