Skip to content

Commit

Permalink
add exit code check and add some debugging info
Browse files Browse the repository at this point in the history
Co-authored-by: Kenneth Hoste <[email protected]>
  • Loading branch information
bedroge and boegel authored Mar 26, 2024
1 parent f01b66b commit 3a39112
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion scripts/update_lmod_caches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,12 @@ for archdir in ${architectures}
do
lmod_cache_dir="${archdir}/.lmod/cache"
${update_lmod_system_cache_files} -d ${lmod_cache_dir} -t ${lmod_cache_dir}/timestamp ${archdir}/modules/all
echo_green "Updated the Lmod cache for ${archdir}."
exit_code=$?
if [[ ${exit_code} -eq 0 ]]; then
echo_green "Updated the Lmod cache for ${archdir}."
ls -lrt ${lmod_cache_dir}
else
echo_red "Updating the Lmod cache failed for ${archdir}."
exit ${exit_code}
fi
done

0 comments on commit 3a39112

Please sign in to comment.