Revert "avoid using realpath, readlink -f is more portable"

This reverts commit 2cae95334c.
This commit is contained in:
Philip Sakievich 2022-11-08 23:40:03 -07:00
parent 730d005a56
commit 38313cadf4

View File

@ -11,12 +11,7 @@
# #
QA_DIR="$(dirname ${BASH_SOURCE[0]})" QA_DIR="$(dirname ${BASH_SOURCE[0]})"
if realpath $QA_DIR >& /dev/null ; then export SPACK_ROOT=$(realpath "$QA_DIR/../../..")
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"
@ -33,7 +28,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"