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
99ca2845
Commit
99ca2845
authored
Feb 26, 2019
by
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
Changes
3
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
99ca2845
...
...
@@ -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
...
...
data/etc/cern_profile.csh
View file @
99ca2845
...
...
@@ -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
data/etc/cern_profile.sh
View file @
99ca2845
...
...
@@ -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
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