@@ -134,6 +134,9 @@ init_files=(
134
134
minimal_eessi_env README.md test.py lmod_eessi_archdetect_wrapper.sh lmod_eessi_archdetect_wrapper_accel.sh
135
135
136
136
)
137
+ # make sure that scripts in init/ and scripts/ use correct EESSI version
138
+ sed -i " s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION} /g" ${TOPDIR} /init/eessi_defaults
139
+
137
140
copy_files_by_list ${TOPDIR} /init ${INSTALL_PREFIX} /init " ${init_files[@]} "
138
141
139
142
# Copy for the init/arch_specs directory
@@ -152,12 +155,16 @@ copy_files_by_list ${TOPDIR}/init/Magic_Castle ${INSTALL_PREFIX}/init/Magic_Cast
152
155
mc_files=(
153
156
2023.06.lua
154
157
)
158
+ # replace EESSI version used in comments in EESSI module
159
+ sed -i " s@/<EESSI_VERSION>/@/${EESSI_VERSION} /@g" ${TOPDIR} /init/modules/EESSI/${EESSI_VERSION} .lua
155
160
copy_files_by_list ${TOPDIR} /init/modules/EESSI ${INSTALL_PREFIX} /init/modules/EESSI " ${mc_files[@]} "
156
161
157
162
# Copy for init/lmod directory
158
- init_script_files=(
159
- bash zsh ksh fish csh
160
- )
163
+ init_script_files=$( ls ${TOPDIR} /init/lmod)
164
+ # replace placeholder for default EESSI version in Lmod init scripts
165
+ for shell in $init_script_files ; do
166
+ sed -i " s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION} /g" ${TOPDIR} /init/lmod/${shell}
167
+ done
161
168
copy_files_by_list ${TOPDIR} /init/lmod ${INSTALL_PREFIX} /init/lmod " ${init_script_files[@]} "
162
169
163
170
# Copy for the scripts directory
@@ -186,22 +193,6 @@ ${INSTALL_PREFIX}/scripts/gpu_support/nvidia/easystacks "${host_injections_easys
186
193
hook_files=(
187
194
eb_hooks.py
188
195
)
189
- copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX} /init/easybuild " ${hook_files[@]} "
190
-
191
- # replace version placeholders in scripts;
192
- # note: the commands below are always run, regardless of whether the scripts were changed,
193
- # but that should be fine (no changes are made if version placeholder is not present anymore)
194
-
195
- # make sure that scripts in init/ and scripts/ use correct EESSI version
196
- sed -i " s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION} /g" ${INSTALL_PREFIX} /init/eessi_defaults
197
-
198
- # replace placeholder for default EESSI version in Lmod init scripts
199
- for shell in $( ls ${INSTALL_PREFIX} /init/lmod) ; do
200
- sed -i " s/__EESSI_VERSION_DEFAULT__/${EESSI_VERSION} /g" ${INSTALL_PREFIX} /init/lmod/${shell}
201
- done
202
-
203
- # replace EESSI version used in comments in EESSI module
204
- sed -i " s@/<EESSI_VERSION>/@/${EESSI_VERSION} /@g" ${INSTALL_PREFIX} /init/modules/EESSI/${EESSI_VERSION} .lua
205
-
206
196
# replace EESSI version used in EasyBuild hooks
207
- sed -i " s@/eessi-<EESSI_VERSION>/@/eessi-${EESSI_VERSION} /@g" ${INSTALL_PREFIX} /init/easybuild/eb_hooks.py
197
+ sed -i " s@/eessi-<EESSI_VERSION>/@/eessi-${EESSI_VERSION} /@g" ${TOPDIR} /eb_hooks.py
198
+ copy_files_by_list ${TOPDIR} ${INSTALL_PREFIX} /init/easybuild " ${hook_files[@]} "
0 commit comments