File tree Expand file tree Collapse file tree 1 file changed +3
-27
lines changed Expand file tree Collapse file tree 1 file changed +3
-27
lines changed Original file line number Diff line number Diff line change 3636# Find all subtrees of supported CPU targets by looking for "modules" directories, and taking their parent directory
3737architectures=$( find ${stack_base_dir} /software/ -maxdepth 5 -type d -name modules -exec dirname {} \; )
3838
39- # For every subtree:
40- # - create an .lmod directory;
41- # - add an lmodrc.lua file that defines the location of the cache;
42- # - create or update the cache.
39+ # Create/update the Lmod cache for all architectures
4340for archdir in ${architectures}
4441do
45- DOT_LMOD=" ${archdir} /.lmod"
46- LMOD_RC=" ${archdir} /.lmod/lmodrc.lua"
47-
48- if [ ! -d " ${DOT_LMOD} " ]
49- then
50- mkdir -p " ${DOT_LMOD} /cache"
51- fi
52-
53- if [ ! -f " ${LMOD_RC} " ]
54- then
55- cat > " ${LMOD_RC} " << LMODRCEOF
56- propT = {
57- }
58- scDescriptT = {
59- {
60- ["dir"] = "${DOT_LMOD} /cache",
61- ["timestamp"] = "${DOT_LMOD} /cache/timestamp",
62- },
63- }
64- LMODRCEOF
65- fi
66-
67- ${update_lmod_system_cache_files=} -d ${DOT_LMOD} /cache -t ${DOT_LMOD} /cache/timestamp ${archdir} /modules/all
42+ lmod_cache_dir=" ${archdir} /.lmod/cache"
43+ ${update_lmod_system_cache_files=} -d ${lmod_cache_dir} -t ${lmod_cache_dir} /timestamp ${archdir} /modules/all
6844 echo_green " Updated the Lmod cache for ${archdir} ."
6945done
You can’t perform that action at this time.
0 commit comments