Skip to content

Commit

Permalink
always append to list of files to include in tarball, to avoid overwr…
Browse files Browse the repository at this point in the history
…iting it
  • Loading branch information
boegel committed Dec 21, 2023
1 parent 3ec3df8 commit 42e3404
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions create_tarball.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,23 @@ 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

# include scripts that were copied by install_scripts.sh
if [ -d ${eessi_version}/scripts ]; then
# include scripts we wish to ship along with EESSI,
find ${eessi_version}/scripts -type f | grep -v '/\.wh\.' > ${files_list}
# include Lmod cache and configuration file (lmodrc.lua),
if [ -d ${eessi_version}/software/${os}/${cpu_arch_subdir}/.lmod ]; then
# skip whiteout files and backup copies of Lmod cache (spiderT.old.*)
find ${eessi_version}/software/${os}/${cpu_arch_subdir}/.lmod -type f | egrep -v '/\.wh\.|spiderT.old' >> ${files_list}
fi

if [ -d ${eessi_version}/software/${os}/${cpu_arch_subdir}/.lmod ]; then
# include Lmod cache and configuration file (lmodrc.lua),
# skip whiteout files and backup copies of Lmod cache (spiderT.old.*)
find ${eessi_version}/software/${os}/${cpu_arch_subdir}/.lmod -type f | egrep -v '/\.wh\.|spiderT.old' >> ${files_list}
fi

# include scripts that were copied by install_scripts.sh, which we want to ship in EESSI repository
if [ -d ${eessi_version}/scripts ]; then
find ${eessi_version}/scripts -type f | grep -v '/\.wh\.' >> ${files_list}
fi

if [ -d ${eessi_version}/software/${os}/${cpu_arch_subdir}/modules ]; then
# module files
find ${eessi_version}/software/${os}/${cpu_arch_subdir}/modules -type f | grep -v '/\.wh\.' >> ${files_list}
Expand All @@ -61,6 +67,7 @@ if [ -d ${eessi_version}/software/${os}/${cpu_arch_subdir}/modules ]; then
| grep -v '/\.wh\.' | grep -v '/\.modulerc\.lua' | sed -e 's/.lua$//' | sed -e 's@.*/modules/all/@@g' | sort -u \
>> ${module_files_list}
fi

if [ -d ${eessi_version}/software/${os}/${cpu_arch_subdir}/software -a -r ${module_files_list} ]; then
# installation directories but only those for which module files were created
# Note, we assume that module names (as defined by 'PACKAGE_NAME/VERSION.lua'
Expand Down

0 comments on commit 42e3404

Please sign in to comment.