Skip to content

Commit 09aa76b

Browse files
committed
remove code for creating lmod_rc
1 parent 8594f0e commit 09aa76b

File tree

1 file changed

+3
-27
lines changed

1 file changed

+3
-27
lines changed

scripts/update_lmod_caches.sh

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -36,34 +36,10 @@ fi
3636
# Find all subtrees of supported CPU targets by looking for "modules" directories, and taking their parent directory
3737
architectures=$(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
4340
for archdir in ${architectures}
4441
do
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}."
6945
done

0 commit comments

Comments
 (0)