avoid using realpath, readlink -f is more portable
This commit is contained in:
parent
076d60ce35
commit
2cae95334c
@ -11,7 +11,12 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
QA_DIR="$(dirname ${BASH_SOURCE[0]})"
|
QA_DIR="$(dirname ${BASH_SOURCE[0]})"
|
||||||
export SPACK_ROOT=$(realpath "$QA_DIR/../../..")
|
if realpath $QA_DIR >& /dev/null ; then
|
||||||
|
REALPATH=realpath
|
||||||
|
else
|
||||||
|
REALPATH="readlink -f --"
|
||||||
|
fi
|
||||||
|
export SPACK_ROOT=$($REALPATH "$QA_DIR/../../..")
|
||||||
|
|
||||||
# Source the setup script
|
# Source the setup script
|
||||||
. "$SPACK_ROOT/share/spack/setup-env.sh"
|
. "$SPACK_ROOT/share/spack/setup-env.sh"
|
||||||
@ -28,7 +33,7 @@ if [[ "$COVERAGE" == "true" ]]; then
|
|||||||
|
|
||||||
# bash coverage depends on some other factors
|
# bash coverage depends on some other factors
|
||||||
mkdir -p coverage
|
mkdir -p coverage
|
||||||
bashcov=$(realpath ${QA_DIR}/bashcov)
|
bashcov=$($REALPATH ${QA_DIR}/bashcov)
|
||||||
|
|
||||||
# instrument scripts requiring shell coverage
|
# instrument scripts requiring shell coverage
|
||||||
sed -i "s@#\!/bin/bash@#\!${bashcov}@" "$SPACK_ROOT/lib/spack/env/cc"
|
sed -i "s@#\!/bin/bash@#\!${bashcov}@" "$SPACK_ROOT/lib/spack/env/cc"
|
||||||
|
Loading…
Reference in New Issue
Block a user