Commit 99ca2845 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

Merge branch 'prepare-for-commissioning' into 'master'

Prepare for commissioning

See merge request !1
parents 61db45da ada7b5f9
Pipeline #723580 passed with stages
in 1 minute and 24 seconds
......@@ -18,6 +18,9 @@ It is meant to be the main entry point (for HEPIX), and delegate to the files
in `cern_profile.d` for the basic environment, and to `LbEnv-flavour.sh` for
the rest.
*Note*: While commissioning these new scripts, the flavour _stable_ actually
uses the _prod_ version of `LbLogin` rather than `LbEnv-stable.`
The user can control the behaviour of the script by means of special files
in the home directory:
- `.nogrouplogin`: if present, completely disable customization
......
......@@ -10,7 +10,7 @@
# or submit itself to any jurisdiction. #
###############################################################################
# see cern_profile.sh for documentation
if ( -e "${HOME}" && ! ( -e "${HOME}/.nogrouplogin" || -e "${HOME}/.noLHCBLoginscript" ) ) then
if ( -e "${HOME}" && ! -e "${HOME}/.nogrouplogin" ) then
# customization enabled
foreach _f ( %target_dir%/etc/cern_profile.d/*.csh )
source ${_f}
......@@ -40,9 +40,23 @@ if ( -e "${HOME}" && ! ( -e "${HOME}/.nogrouplogin" || -e "${HOME}/.noLHCBLogins
breaksw
endsw
endif
# source the LbEnv main script
if ( -e %target_dir%/LbEnv-${_lbenv_flavour}.csh ) then
source %target_dir%/LbEnv-${_lbenv_flavour}.csh
if ( "$_lbenv_flavour" == stable ) then
# for the time being "stable" means LbLogin
if ( ! $?LBLOGIN_SOURCED && -e %target_dir%/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.csh ] ; then
if ( $?prompt ) then
# interactive shell: print banner
source %target_dir%/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.csh
else
# non-interactive: do not print
source %target_dir%/lhcb/LBSCRIPTS/prod/InstallArea/scripts/LbLogin.csh >&/dev/null
endif
setenv LBLOGIN_SOURCED 1
fi
else
# source the LbEnv main script
if ( -e %target_dir%/LbEnv-${_lbenv_flavour}.csh ) then
source %target_dir%/LbEnv-${_lbenv_flavour}.csh
endif
endif
endif
endif
......@@ -24,11 +24,12 @@
# equivalent to _stable_
#
# For backward compatibility we also accept:
# - `.noLHCBLoginscript`: same as `.nogrouplogin`
# - `.noLHCBLoginscript`: same as `.nogrouplogin` (temporarily disabled until
# this script will be commissioned)
# - `.devLHCBLoginscript`: if present, equivalent to `.lbenv_flavour` containing
# _testing_
#
if [ -e "${HOME}" -a ! \( -e "${HOME}/.nogrouplogin" -o -e "${HOME}/.noLHCBLoginscript" \) ] ; then
if [ -e "${HOME}" -a ! \( -e "${HOME}/.nogrouplogin" \) ] ; then
# customization enabled
for _f in %target_dir%/etc/cern_profile.d/*.sh ; do
source ${_f}
......@@ -52,9 +53,23 @@ if [ -e "${HOME}" -a ! \( -e "${HOME}/.nogrouplogin" -o -e "${HOME}/.noLHCBLogin
*) _lbenv_flavour=stable ;; # anything else maps to stable
esac
fi
# source the LbEnv main script
if [ -e %target_dir%/LbEnv-${_lbenv_flavour}.sh ] ; then
source %target_dir%/LbEnv-${_lbenv_flavour}.sh
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 [[ $- == *i* ]] ; then
# interactive shell: print banner
source %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
fi
export LBLOGIN_SOURCED=1
fi
else
# source the LbEnv main script
if [ -e %target_dir%/LbEnv-${_lbenv_flavour}.sh ] ; then
source %target_dir%/LbEnv-${_lbenv_flavour}.sh
fi
fi
fi
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