diff --git a/bootstrap/etc/lofar20rc.sh b/bootstrap/etc/lofar20rc.sh index e3c75df48457342a6ba9d8e061a322e324ee17c4..f9f87d6dfb0c3a4d5fb0b94791a5027d0361ecb2 100755 --- a/bootstrap/etc/lofar20rc.sh +++ b/bootstrap/etc/lofar20rc.sh @@ -1,3 +1,4 @@ +#! /usr/bin/env bash -e # Set up the LOFAR2.0 environment. # For the time being it is assumend that the LOFAR2.0 environment has to # co-exist with a LOFAR1 environment. @@ -6,9 +7,10 @@ # And export those directories for LOFAR in Tango Docker images. # Pass a directory as first parameter to this script. This will -# then be used as LOFAR20_DIR. Otherwise the current directory will -# be used. -export LOFAR20_DIR=${1:-${PWD}} +# then be used as LOFAR20_DIR. Otherwise this file's directory +# be used to determine the tango directory location. +ABSOLUTE_PATH=$(realpath $(dirname ${BASH_SOURCE})) +export LOFAR20_DIR=${1:-$(realpath ${ABSOLUTE_PATH}/../..)} # This needs to be modified for a development environment. # Example: ~/lofar2.0/tango