Commit b2463fad authored by Ben Couturier's avatar Ben Couturier
Browse files

Merge branch 'move-lblogin-hack' into 'master'

Move LbLogin backward compatibility hack from LbEnv

See merge request !5
parents 6f2dd09f e9a2cc01
Pipeline #744216 passed with stages
in 1 minute and 50 seconds
......@@ -34,7 +34,7 @@ install -m 0644 data/etc/cern_profile.*sh ${RPM_BUILD_ROOT}/%{prefix}/etc
install -m 0644 data/etc/cern_profile.d/*.*sh ${RPM_BUILD_ROOT}/%{prefix}/etc/cern_profile.d
mkdir -p ${RPM_BUILD_ROOT}%{prefix}/bin
install -m 0755 'data/bin/host_os' ${RPM_BUILD_ROOT}/%{prefix}/bin
install -m 0755 data/bin/* ${RPM_BUILD_ROOT}/%{prefix}/bin
for flavour in stable testing unstable ; do
for suff in '' .sh .csh ; do
......@@ -71,6 +71,7 @@ done
%{prefix}/etc/cern_profile.d/cern_env.sh
%{prefix}/etc/cern_profile.d/cern_env.csh
%{prefix}/bin/host_os
%{prefix}/bin/LbLogin.sh
%{prefix}/LbEnv
%{prefix}/LbEnv.sh
%{prefix}/LbEnv.csh
......
......@@ -10,6 +10,8 @@
# or submit itself to any jurisdiction. #
###############################################################################
if ( ! $?LBENV_SOURCED ) then
setenv LBENV_ENTRYPOINT %target_dir%/LbEnv-%flavour%.csh
setenv LBENV_FLAVOUR %flavour%
set _host_os=`%target_dir%/bin/host_os`
if ( -e %lbenv_root%/$_host_os/bin/activate.csh ) then
......
......@@ -10,6 +10,8 @@
# or submit itself to any jurisdiction. #
###############################################################################
if [ -z "$LBENV_SOURCED" ] ; then
export LBENV_ENTRYPOINT=%target_dir%/LbEnv-%flavour%.sh
export LBENV_FLAVOUR=%flavour%
_host_os=$(%target_dir%/bin/host_os)
if [ -e %lbenv_root%/$_host_os/bin/activate ] ; then
......
#!/usr/bin/printf you must "source %s"\n
###############################################################################
# (c) Copyright 2019 CERN for the benefit of the LHCb Collaboration #
# #
# This software is distributed under the terms of the GNU General Public #
# Licence version 3 (GPL Version 3), copied verbatim in the file "LICENSE". #
# #
# In applying this licence, CERN does not waive the privileges and immunities #
# granted to it by virtue of its status as an Intergovernmental Organization #
# or submit itself to any jurisdiction. #
###############################################################################
# Backward compatibility wrapper for scripts relying on LbLogin.sh in the path
if [ -r ${LBENV_ENTRYPOINT:-${MYSITEROOT}/LbEnv.sh} ] ; then
unset LBENV_SOURCED
source ${LBENV_ENTRYPOINT:-${MYSITEROOT}/LbEnv.sh} "$@"
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