Commit 180b04c2 authored by Ben Couturier's avatar Ben Couturier
Browse files

Merge branch 'add-aliases-for-nolbenv' into 'master'

Add helper aliases to start LbEnv when using ~/.nolbenv

See merge request !17
parents c6e5b7ec 6a367acc
Pipeline #1406930 passed with stages
in 1 minute and 58 seconds
......@@ -58,7 +58,7 @@ for flavour in stable testing unstable ; do
done
done
for script in ${RPM_INSTALL_PREFIX}/etc/cern_profile.{sh,csh} \
${RPM_INSTALL_PREFIX}/etc/cern_profile.d/cern_env.{sh,csh} ; do
${RPM_INSTALL_PREFIX}/etc/cern_profile.d/{cern_env,lbenv_aliases}.{sh,csh} ; do
sed -i "s#%target_dir%#${RPM_INSTALL_PREFIX}#g" "${script}"
done
......@@ -70,6 +70,8 @@ done
%{prefix}/etc/cern_profile.csh
%{prefix}/etc/cern_profile.d/cern_env.sh
%{prefix}/etc/cern_profile.d/cern_env.csh
%{prefix}/etc/cern_profile.d/lbenv_aliases.sh
%{prefix}/etc/cern_profile.d/lbenv_aliases.csh
%{prefix}/bin/host_os
%{prefix}/bin/LbLogin.sh
%{prefix}/LbEnv
......
#!/usr/bin/printf you must "source %s"\n
###############################################################################
# (c) Copyright 2020 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 "COPYING". #
# #
# 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. #
###############################################################################
# aliases to easily start an LbEnv environment when using ~/.nolbenv
alias LbEnv-stable "%target_dir%/LbEnv-stable.sh"
alias LbEnv-testing "%target_dir%/LbEnv-testing.sh"
alias LbEnv-unstable "%target_dir%/LbEnv-unstable.sh"
alias LbEnv-legacy "%target_dir%/LbEnv-legacy.sh"
alias LbEnv "%target_dir%/LbEnv-stable.sh"
#!/usr/bin/printf you must "source %s"\n
###############################################################################
# (c) Copyright 2020 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 "COPYING". #
# #
# 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. #
###############################################################################
# aliases to easily start an LbEnv environment when using ~/.nolbenv
for _lbenv_flavour in stable testing unstable legacy ; do
if [ -e %target_dir%/LbEnv-${_lbenv_flavour}.sh ] ; then
alias LbEnv-${_lbenv_flavour}="source %target_dir%/LbEnv-${_lbenv_flavour}.sh"
fi
done
unset _lbenv_flavour
alias LbEnv="source %target_dir%/LbEnv-stable.sh"
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