File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
singularity/build/scripts Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ CONTENDER_STAGES=$(cat $SINGULARITY_BUILDDEF | grep ^[[:blank:]]*Stage:)
1717
1818# Case 1: We have stages
1919for stage in $CONTENDER_STAGES ; do
20- if [ " $stage " != " Stage" ]; then
20+ if [ " $stage " != " Stage: " ]; then
2121 stages=" $stage $stages "
2222 fi
2323done
152152 mkdir -p " ${SINGULARITY_WORKDIR} $STAGED_BUILD_IMAGE "
153153 echo " none ${STAGED_BUILD_IMAGE} bind dev 0 0" >> " $FSTAB_FILE "
154154 echo " bind path = /tmp/sbuild$stage /fs:$STAGED_BUILD_IMAGE " >> " $TMP_CONF_FILE "
155- echo " bind path = /tmp/sbuild$stage /fs:$STAGED_BUILD_IMAGE " >> " $TMP_CONF_FILE "
156155 done
157156
158157 # The final stage is where we put the container
@@ -161,6 +160,10 @@ else
161160 # We only use the builder once, make default config
162161 cp " $TMP_CONF_FILE " " ${SINGULARITY_confdir} /singularity.conf"
163162
163+ # add final lines of build script
164+ echo " singularity build --no-cleanup $STAGED_BUILD_IMAGE /container.sif $BUILDDEF " >> " ${BUILD_SCRIPT} "
165+ echo " exit \$ ?" >> ${BUILD_SCRIPT}
166+
164167fi
165168
166169# Shared final tweaks
You can’t perform that action at this time.
0 commit comments