diff --git a/export-image/03-finalise/01-run.sh b/export-image/03-finalise/01-run.sh index 4a7a46c..743d689 100755 --- a/export-image/03-finalise/01-run.sh +++ b/export-image/03-finalise/01-run.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" +IMG_FILE="${STAGE_WORK_DIR}/${IMG_NAME}${IMG_SUFFIX}.img" on_chroot sh -e - < /dev/null -zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip $(basename ${IMG_FILE}) +zip ${DEPLOY_DIR}/${IMG_NAME}${IMG_SUFFIX}.zip $(basename ${IMG_FILE}) popd > /dev/null diff --git a/export-image/prerun.sh b/export-image/prerun.sh index aaf9bfa..fc52e33 100755 --- a/export-image/prerun.sh +++ b/export-image/prerun.sh @@ -1,11 +1,15 @@ #!/bin/bash -e -IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img" +IMG_FILE="${STAGE_WORK_DIR}/${IMG_NAME}${IMG_SUFFIX}.img" +echo "Doing cleanup first" unmount_image ${IMG_FILE} rm -f ${IMG_FILE} rm -rf ${ROOTFS_DIR} + +echo "Cleanup done" + mkdir -p ${ROOTFS_DIR} BOOT_SIZE=$(du -sh ${EXPORT_ROOTFS_DIR}/boot -B M | cut -f 1 | tr -d M)