Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
LHCb Core Software
LbEnvBootstrap
Commits
093ac612
Commit
093ac612
authored
Jan 16, 2020
by
Marco Clemencic
Browse files
Add special flavour "legacy" for LbLogin
parent
7a14aba4
Pipeline
#1348068
passed with stages
in 45 seconds
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
093ac612
...
...
@@ -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
...
...
data/etc/cern_profile.csh
View file @
093ac612
...
...
@@ -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
...
...
data/etc/cern_profile.sh
View file @
093ac612
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment