Enable running setup-env from non-bash shells (#319)
Signed-off-by: Tal Ben-Nun <talbn@llnl.gov>
[ROCm/rocprofiler-systems commit: 5b42702299]
Este commit está contenido en:
@@ -1,6 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
BASEDIR=$(dirname ${BASH_SOURCE[0]})
|
||||
if [ -z "$BASH_SOURCE" ]; then
|
||||
# If not running bash, try to obtain directory with $0
|
||||
BASEDIR="$( cd "$(dirname "$0")"; pwd -P )"
|
||||
else
|
||||
BASEDIR=$(dirname ${BASH_SOURCE[0]})
|
||||
fi
|
||||
command -v realpath &> /dev/null && BASEDIR=$(realpath ${BASEDIR}/../..) || BASEDIR=$(cd ${BASEDIR}/../.. && pwd)
|
||||
|
||||
if [ ! -d "${BASEDIR}" ]; then
|
||||
|
||||
Referencia en una nueva incidencia
Block a user