Commit 093ac612 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Add special flavour "legacy" for LbLogin

parent 7a14aba4
Pipeline #1348068 passed with stages
in 45 seconds
......@@ -25,9 +25,10 @@ The user can control the behaviour of the script by means of special files
in the home directory:
- `.nogrouplogin`: if present, completely disable customization
- `.nolbenv`: if present, disable LbEnv, but keep site specific variables
- `.lbenv_flavour`: it must contain any of _stable_, _testing_ or _unstable_
to select the version of LbEnv kit to use. If missing or invalid, it is
equivalent to _stable_
- `.lbenv_flavour`: it must contain any of _stable_, _testing_, _unstable_
or _legacy_ to select the version of LbEnv kit to use. If missing or invalid,
it is equivalent to _stable_. The flavour _legacy_ uses `LbLogin` instead of
`LbEnv`.
For backward compatibility we also accept:
- `.noLHCBLoginscript`: same as `.nogrouplogin` (temporarily disabled until
......
......@@ -43,6 +43,7 @@ if ( -e "${_home_dir}" && ! -e "${_home_dir}/.nogrouplogin" ) then
case stable:
case testing:
case unstable:
case legacy:
breaksw # these are fine, nothing to do
default:
# anything else maps to stable
......@@ -50,8 +51,11 @@ if ( -e "${_home_dir}" && ! -e "${_home_dir}/.nogrouplogin" ) then
breaksw
endsw
endif
# for the time being "stable" means LbLogin
if ( "$_lbenv_flavour" == stable ) then
# for the time being "stable" means LbLogin
set _lbenv_flavour=legacy
endif
if ( "$_lbenv_flavour" == legacy ) then
if ( ! $?LBLOGIN_SOURCED && -e %target_dir%/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.csh ) then
if ( $?prompt ) then
# interactive shell: print banner
......
......@@ -54,12 +54,15 @@ if [ -e "${_home_dir}" -a ! \( -e "${_home_dir}/.nogrouplogin" \) ] ; then
# check the content of the special file
_lbenv_flavour=$(cat "${_home_dir}/.lbenv_flavour")
case "${_lbenv_flavour}" in
stable|testing|unstable) ;; # these are fine, nothing to do
stable|testing|unstable|legacy) ;; # these are fine, nothing to do
*) _lbenv_flavour=stable ;; # anything else maps to stable
esac
fi
# for the time being "stable" means LbLogin
if [ "${_lbenv_flavour}" = stable ] ; then
# for the time being "stable" means LbLogin
_lbenv_flavour=legacy
fi
if [ "${_lbenv_flavour}" = legacy ] ; 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
......
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