Skip to content

Commit

Permalink
Adds sed command to remove load commands.
Browse files Browse the repository at this point in the history
Addresses #177
  • Loading branch information
Cristian Di Pietrantonio committed Aug 10, 2023
1 parent 5697c7f commit feeea04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/create_custom_singularity_modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ PAWSEY_SPACK_CONFIG_REPO=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/.." &> /d

# define source (Spack) and destination (Pawsey) directories for Singularity
src_dir="${INSTALL_PREFIX}/modules/${cpu_arch}/gcc/${gcc_version}/utilities/${singularity_name}"
sed -i '/^load("/d' ${src_dir}/*.lua

dst_dir="${INSTALL_PREFIX}/${singularity_symlink_module_dir}"

# ensure destination directory exists
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ PAWSEY_SPACK_CONFIG_REPO=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )/.." &> /d
# define source (Spack) and destination (Pawsey) directories for Singularity
src_old_dir="${INSTALL_PREFIX}/modules/${cpu_arch}/gcc/${gcc_version}/utilities/${singularity_name_general}"
src_dir="${INSTALL_PREFIX}/modules/${cpu_arch}/gcc/${gcc_version}/utilities/${singularity_name}"
sed -i '/^load("/d' ${src_dir}/*.lua
dst_dir="${INSTALL_PREFIX}/${singularity_symlink_module_dir}"
echo "Using module files in ${src_old_dir}"
echo "Copying them to ${src_dir}"
Expand Down

0 comments on commit feeea04

Please sign in to comment.