Commit 3a0f1a50 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Allow overriding of hardcoded siteroot

parent c829e724
Pipeline #861480 passed with stages
in 1 minute and 23 seconds
......@@ -16,7 +16,7 @@ if [ -z "$LBENV_SOURCED" ] ; then
if [ -e %lbenv_root%/$_host_os/bin/activate ] ; then
source %lbenv_root%/$_host_os/bin/activate
eval $(python -m LbEnv --sh --siteroot %siteroot% "$@" || echo deactivate)
eval $(python -m LbEnv --sh --siteroot ${OVERRIDE_MYSITEROOT:-%siteroot%} "$@" || echo deactivate)
else
echo "Platform not supported ($_host_os)"
fi
......
......@@ -60,13 +60,13 @@ if [ -e "${_home_dir}" -a ! \( -e "${_home_dir}/.nogrouplogin" \) ] ; then
fi
if [ "${_lbenv_flavour}" = stable ] ; then
# for the time being "stable" means LbLogin
if [ -z "$LBLOGIN_SOURCED" -a -e %target_dir%/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.sh ] ; then
if [ -z "$LBLOGIN_SOURCED" -a -e ${OVERRIDE_MYSITEROOT:-%target_dir%}/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.sh ] ; then
if [[ $- == *i* ]] ; then
# interactive shell: print banner
source %target_dir%/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.sh
source ${OVERRIDE_MYSITEROOT:-%target_dir%}/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.sh
else
# non-interactive: do not print
source %target_dir%/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.sh >/dev/null 2>&1
source ${OVERRIDE_MYSITEROOT:-%target_dir%}/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.sh >/dev/null 2>&1
fi
export LBLOGIN_SOURCED=1
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment