From 965ccb78cf5064780f606fc3da9f4af26be05807 Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Tue, 27 Oct 2020 00:13:09 -0700 Subject: sbang: use bashcov in sbang on Linux --- share/spack/qa/setup.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'share') diff --git a/share/spack/qa/setup.sh b/share/spack/qa/setup.sh index 34b426dcd7..e614bae909 100755 --- a/share/spack/qa/setup.sh +++ b/share/spack/qa/setup.sh @@ -28,9 +28,14 @@ if [[ "$COVERAGE" == "true" ]]; then # bash coverage depends on some other factors mkdir -p coverage - cc_script="$SPACK_ROOT/lib/spack/env/cc" bashcov=$(realpath ${QA_DIR}/bashcov) - sed -i~ "s@#\!/bin/bash@#\!${bashcov}@" "$cc_script" + + # instrument scripts requiring shell coverage + sed -i~ "s@#\!/bin/bash@#\!${bashcov}@" "$SPACK_ROOT/lib/spack/env/cc" + if [ "$(uname -o)" != "Darwin" ]; then + # On darwin, #! interpreters must be binaries, so no sbang for bashcov + sed -i~ "s@#\!/bin/sh@#\!${bashcov}@" "$SPACK_ROOT/bin/sbang" + fi fi # -- cgit v1.2.3-70-g09d2