Skip to content

Commit 3a39112

Browse files
bedrogeboegel
andauthored
add exit code check and add some debugging info
Co-authored-by: Kenneth Hoste <[email protected]>
1 parent f01b66b commit 3a39112

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

scripts/update_lmod_caches.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,12 @@ for archdir in ${architectures}
4141
do
4242
lmod_cache_dir="${archdir}/.lmod/cache"
4343
${update_lmod_system_cache_files} -d ${lmod_cache_dir} -t ${lmod_cache_dir}/timestamp ${archdir}/modules/all
44-
echo_green "Updated the Lmod cache for ${archdir}."
44+
exit_code=$?
45+
if [[ ${exit_code} -eq 0 ]]; then
46+
echo_green "Updated the Lmod cache for ${archdir}."
47+
ls -lrt ${lmod_cache_dir}
48+
else
49+
echo_red "Updating the Lmod cache failed for ${archdir}."
50+
exit ${exit_code}
51+
fi
4552
done

0 commit comments

Comments
 (0)