Skip to content

Commit

Permalink
attempt to fix issue EESSI#225
Browse files Browse the repository at this point in the history
  • Loading branch information
truib committed Mar 17, 2023
1 parent 437ae24 commit c9bf99c
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion create_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ cd ${overlay_upper_dir}/versions/
echo ">> Collecting list of files/directories to include in tarball via ${PWD}..."

files_list=${tmpdir}/files.list.txt
module_files_list=${tmpdir}/module_files.list.txt

if [ -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/.lmod ]; then
# include Lmod cache and configuration file (lmodrc.lua),
Expand All @@ -49,12 +50,26 @@ if [ -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules ]; then
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules -type f | grep -v '/\.wh\.' >> ${files_list}
# module symlinks
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules -type l | grep -v '/\.wh\.' >> ${files_list}
# module files and symlinks
find ${pilot_version}/software/${os}/${cpu_arch_subdir}/modules -type f -o -type l \
| grep -v '/\.wh\.' | sed -e 's/.lua$//' | awk -F'/' '{printf "%s/%s\n", $(NF-1), $NF}' | sort | uniq \
>> ${module_files_list}
fi
if [ -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software ]; then
# installation directories
ls -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software/*/* | grep -v '/\.wh\.' >> ${files_list}
# ls -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software/*/* | grep -v '/\.wh\.' >> ${files_list}
for package_version in $(cat ${module_files_list}); do
echo "handling ${package_version}"
ls -d ${pilot_version}/software/${os}/${cpu_arch_subdir}/software/${package_version} \
| grep -v '/\.wh\.' >> ${files_list}
done
fi

echo "wrote file list to ${files_list}"
cat ${files_list}
echo "wrote module file list to ${module_files_list}"
cat ${module_files_list}

topdir=${cvmfs_repo}/versions/

echo ">> Creating tarball ${target_tgz} from ${topdir}..."
Expand Down

0 comments on commit c9bf99c

Please sign in to comment.