refactor(scripts): clean up bash scripts

This commit is contained in:
ObserverOfTime 2024-03-28 17:33:55 +02:00
parent 3950dddfde
commit f50123a3ec
18 changed files with 241 additions and 261 deletions

View file

@ -6,17 +6,17 @@ function scan_build {
# which doesn't support the '-std=c++14' (it is available via '-std=c++1y').
# Use the system-wide installed clang instead which is 3.5 and does support
# '-std=c++14'.
extra_args+=("--use-analyzer=$(which clang)")
extra_args+=("--use-analyzer=$(command -v clang)")
# scan-build will try to guess which CXX should be used to compile the actual
# code, which is usually g++ but we need g++5 in the CI. Explicitly pass
# $CC/$CXX to scan-build if they are set in the environment.
if [[ ! -z "$CC" ]]; then
if [[ -n $CC ]]; then
extra_args+=("--use-cc=$CC")
fi
if [[ ! -z "$CXX" ]]; then
if [[ -n $CXX ]]; then
extra_args+=("--use-c++=$CXX")
fi