Skip to content

Commit

Permalink
Merge pull request #834 from bedroge/init_lmod_cvmfs_repo_var
Browse files Browse the repository at this point in the history
use variable for CVMFS repository in Lmod initialization scripts
  • Loading branch information
trz42 authored Dec 6, 2024
2 parents 9052eb2 + c024380 commit 770f66a
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
6 changes: 4 additions & 2 deletions init/lmod/bash
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Choose an EESSI CVMFS repository
EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}"
# Choose an EESSI version
EESSI_VERSION="${EESSI_VERSION:-2023.06}"
# Path to top-level module tree
export MODULEPATH=/cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/init/modules
. /cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/compat/linux/$(uname -m)/usr/share/Lmod/init/bash
export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules"
. "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash"

if [ -z "$__Init_Default_Modules" ]; then
export __Init_Default_Modules=1;
Expand Down
6 changes: 4 additions & 2 deletions init/lmod/csh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Choose an EESSI CVMFS repository
if (! $?EESSI_CVMFS_REPO) then; set EESSI_CVMFS_REPO = "/cvmfs/software.eessi.io"; endif
# Choose an EESSI version
if (! $?EESSI_VERSION) then; set EESSI_VERSION = "2023.06"; endif
# Path to top-level module tree
setenv MODULEPATH /cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/init/modules
source /cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/compat/linux/`uname -m`/usr/share/Lmod/init/csh
setenv MODULEPATH "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules"
source "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/csh"

if (! $?__Init_Default_Modules ) then
setenv __Init_Default_Modules 1;
Expand Down
6 changes: 4 additions & 2 deletions init/lmod/fish
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Choose an EESSI CVMFS repository
set EESSI_CVMFS_REPO (set -q EESSI_CVMFS_REPO; and echo "$EESSI_CVMFS_REPO"; or echo "/cvmfs/software.eessi.io")
# Choose an EESSI version
set EESSI_VERSION (set -q EESSI_VERSION; and echo "$EESSI_VERSION"; or echo "2023.06")
# Path to top-level module tree
set -x MODULEPATH /cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/init/modules
. /cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/compat/linux/(uname -m)/usr/share/Lmod/init/fish
set -x MODULEPATH "$EESSI_CVMFS_REPO"/versions/"$EESSI_VERSION"/init/modules
. "$EESSI_CVMFS_REPO"/versions/"$EESSI_VERSION"/compat/linux/(uname -m)/usr/share/Lmod/init/fish

if test -z "$__Init_Default_Modules"
export __Init_Default_Modules=1;
Expand Down
6 changes: 4 additions & 2 deletions init/lmod/ksh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Choose an EESSI CVMFS repository
EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}"
# Choose an EESSI version
EESSI_VERSION="${EESSI_VERSION:-2023.06}"
# Path to top-level module tree
export MODULEPATH=/cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/init/modules
. /cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/compat/linux/$(uname -m)/usr/share/Lmod/init/ksh
export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules"
. "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/ksh"

if [ -z "$__Init_Default_Modules" ]; then
export __Init_Default_Modules=1;
Expand Down
6 changes: 4 additions & 2 deletions init/lmod/zsh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# Choose an EESSI CVMFS repository
EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}"
# Choose an EESSI version
EESSI_VERSION="${EESSI_VERSION:-2023.06}"
# Path to top-level module tree
export MODULEPATH=/cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/init/modules
. /cvmfs/software.eessi.io/versions/"$EESSI_VERSION"/compat/linux/$(uname -m)/usr/share/Lmod/init/zsh
export MODULEPATH="${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/init/modules"
. "${EESSI_CVMFS_REPO}/versions/${EESSI_VERSION}/compat/linux/$(uname -m)/usr/share/Lmod/init/zsh"

if [ -z "$__Init_Default_Modules" ]; then
export __Init_Default_Modules=1;
Expand Down

0 comments on commit 770f66a

Please sign in to comment.