Skip to content

Commit

Permalink
avoid using unset variables
Browse files Browse the repository at this point in the history
  • Loading branch information
truib committed May 24, 2024
1 parent f8a2266 commit 2213329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions EESSI-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,11 @@ if [ ! -f ${_lmod_sitepackage_file} ]; then
cat -n ${_lmod_sitepackage_file}
else
echo ">> Updating Lmod SitePackage.lua ..."
export LMOD_PACKAGE_PATH="${EASYBUILD_INSTALLPATH}/.lmod"
export LMOD_PACKAGE_PATH="${_lmod_cfg_dir}"
lmod_sitepackage_file="$LMOD_PACKAGE_PATH/SitePackage.lua"
sitepackage_changed=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep '^create_lmodsitepackage.py$' > /dev/null; echo $?)
if [ ! -f "$lmod_sitepackage_file" ] || [ "${sitepackage_changed}" == '0' ]; then
python3 $TOPDIR/create_lmodsitepackage.py ${EASYBUILD_INSTALLPATH}
python3 $TOPDIR/create_lmodsitepackage.py ${_eessi_software_path}
check_exit_code $? "$lmod_sitepackage_file created" "Failed to create $lmod_sitepackage_file"
fi
echo "just updated '${lmod_sitepackage_file}':"
Expand Down

0 comments on commit 2213329

Please sign in to comment.