summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2020-10-27 00:13:09 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2020-10-27 13:59:46 -0700
commit965ccb78cf5064780f606fc3da9f4af26be05807 (patch)
treea3329e99d5e1de8fb5b4beec447f19a03fd7f788 /share
parentec9456feb8f14c173a8786c136a1bc496579231b (diff)
downloadspack-965ccb78cf5064780f606fc3da9f4af26be05807.tar.gz
spack-965ccb78cf5064780f606fc3da9f4af26be05807.tar.bz2
spack-965ccb78cf5064780f606fc3da9f4af26be05807.tar.xz
spack-965ccb78cf5064780f606fc3da9f4af26be05807.zip
sbang: use bashcov in sbang on Linux
Diffstat (limited to 'share')
-rwxr-xr-xshare/spack/qa/setup.sh9
1 files changed, 7 insertions, 2 deletions
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
#