Skip to content

Commit d1eb979

Browse files
committed
pass list of accelerators to create_tarball
1 parent cee46ef commit d1eb979

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

bot/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,6 @@ echo "Executing command to create tarball:"
332332
echo "$software_layer_dir/eessi_container.sh ${COMMON_ARGS[@]} ${TARBALL_STEP_ARGS[@]}"
333333
echo " -- $software_layer_dir/create_tarball.sh ${TMP_IN_CONTAINER} ${EESSI_VERSION}${EESSI_SOFTWARE_LAYER_VERSION_SUFFIX} ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} \"${EESSI_ACCELERATOR_TARGET_OVERRIDES[@]}\" /eessi_bot_job/${TARBALL} 2>&1 | tee -a ${tar_outerr}"
334334
$software_layer_dir/eessi_container.sh "${COMMON_ARGS[@]}" "${TARBALL_STEP_ARGS[@]}" \
335-
-- $software_layer_dir/create_tarball.sh ${TMP_IN_CONTAINER} ${EESSI_VERSION}${EESSI_SOFTWARE_LAYER_VERSION_SUFFIX} ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} \"${EESSI_ACCELERATOR_TARGET_OVERRIDES[@]}\" /eessi_bot_job/${TARBALL} 2>&1 | tee -a ${tar_outerr}
335+
-- $software_layer_dir/create_tarball.sh ${TMP_IN_CONTAINER} ${EESSI_VERSION}${EESSI_SOFTWARE_LAYER_VERSION_SUFFIX} ${EESSI_SOFTWARE_SUBDIR_OVERRIDE} "${EESSI_ACCELERATOR_TARGET_OVERRIDES[*]}" /eessi_bot_job/${TARBALL} 2>&1 | tee -a ${tar_outerr}
336336

337337
exit 0

create_tarball.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111
eessi_tmpdir=$1
1212
eessi_version=$2
1313
cpu_arch_subdir=$3
14-
accel_subdir=$4
14+
accel_subdirs=$4
1515
target_tarball=$5
1616

1717
tmpdir=`mktemp -d`
@@ -64,8 +64,12 @@ fi
6464

6565
# consider both CPU-only and accelerator subdirectories (if an accelerator was configured)
6666
sw_subdirs=${cpu_arch_subdir}
67-
if [ -n "${accel_subdir}" ]; then
68-
sw_subdirs="${sw_subdirs} ${cpu_arch_subdir}/${accel_subdir}"
67+
if [ -n "${accel_subdirs}" ]; then
68+
# convert accel_subdirs into an array...
69+
read -r -a accel_subdirs <<< ${accel_subdirs}
70+
# and prepend the cpu_arch_subdir to all elements
71+
accel_subdirs="${accel_subdirs[@]/#/${cpu_arch_subdir}/}"
72+
sw_subdirs="${sw_subdirs} ${accel_subdirs[@]}"
6973
fi
7074
for subdir in ${sw_subdirs}; do
7175

0 commit comments

Comments
 (0)