From 61a994c88ceb4a9ded0aca5eeedbe56c801b5acd Mon Sep 17 00:00:00 2001 From: Louis Matthijssen <louis@u5r.nl> Date: Wed, 30 Jan 2019 19:09:36 +0100 Subject: Add a DEPLOY_ZIP setting --- export-image/04-finalise/01-run.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'export-image/04-finalise/01-run.sh') diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index d4788c7..2a84173 100755 --- a/export-image/04-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh @@ -75,10 +75,15 @@ unmount_image "${IMG_FILE}" mkdir -p "${DEPLOY_DIR}" rm -f "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" - -pushd "${STAGE_WORK_DIR}" > /dev/null -zip "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" \ - "$(basename "${IMG_FILE}")" -popd > /dev/null +rm -f "${DEPLOY_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img" + +if [ "${DEPLOY_ZIP}" == "1" ]; then + pushd "${STAGE_WORK_DIR}" > /dev/null + zip "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" \ + "$(basename "${IMG_FILE}")" + popd > /dev/null +else + cp "$IMG_FILE" "$DEPLOY_DIR" +fi cp "$INFO_FILE" "$DEPLOY_DIR" -- cgit v1.2.3