Skip to content

Commit 30a8f7c

Browse files
committed
Add some additional comments to the bash script
1 parent 4d97256 commit 30a8f7c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

init/lmod/bash

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@
4444
EESSI_CVMFS_REPO="${EESSI_CVMFS_REPO:-/cvmfs/software.eessi.io}"
4545

4646
# Choose an EESSI version (the default is only used if the EESSI_VERSION environment variable is not provided)
47+
# (Note: in the repository which is home to this file a template value __EESSI_VERSION_DEFAULT__ is present in
48+
# the line below which is replaced within our deployment pipeline.)
4749
EESSI_VERSION_DEFAULT="${__EESSI_VERSION_USED_FOR_INIT:-__EESSI_VERSION_DEFAULT__}"
4850
EESSI_VERSION="${EESSI_VERSION:-${EESSI_VERSION_DEFAULT}}"
4951
# On the first run we want to record the EESSI version used for init as an environment variable so that if a different
@@ -54,7 +56,13 @@ EESSI_VERSION="${EESSI_VERSION:-${EESSI_VERSION_DEFAULT}}"
5456
# the original value is retained.
5557
export __EESSI_VERSION_USED_FOR_INIT="${__EESSI_VERSION_USED_FOR_INIT:-${EESSI_VERSION}}"
5658

57-
# Ability to predefine elsewhere the default list of modules to load (colon separated):
59+
# LMOD_SYSTEM_DEFAULT_MODULES are used by Lmod to load a default set of modules in the scenario
60+
# - where we initialise Lmod (the if part of the clause below)
61+
# - where we reset Lmod (the else part of the clause below)
62+
# This means that if we call this script twice we will get the same end result: an Lmod installation
63+
# with a set of default modules loaded.
64+
#
65+
# We also allow the ability to predefine elsewhere the default list of modules to load (colon separated):
5866
# - EESSI_DEFAULT_MODULES_PREPEND environment variable allows you to prepend modules (loaded last)
5967
# - EESSI_DEFAULT_MODULES_APPEND environment variable allows you to append modules (loaded first)
6068
LMOD_SYSTEM_DEFAULT_MODULES="${EESSI_DEFAULT_MODULES_PREPEND:+$EESSI_DEFAULT_MODULES_PREPEND:}EESSI/$EESSI_VERSION${EESSI_DEFAULT_MODULES_APPEND:+:$EESSI_DEFAULT_MODULES_APPEND}"

0 commit comments

Comments
 (0)