aboutsummaryrefslogtreecommitdiffstats
path: root/export-image/04-finalise/01-run.sh
diff options
context:
space:
mode:
authorLouis Matthijssen <[email protected]>2019-01-30 19:09:36 +0100
committerXECDesign <[email protected]>2019-01-30 19:05:22 +0000
commit61a994c88ceb4a9ded0aca5eeedbe56c801b5acd (patch)
treee709f31bebd0c3389a2189b2dc696389699cc515 /export-image/04-finalise/01-run.sh
parentd945d422d4e26df6fff7185da28874432a974d78 (diff)
Add a DEPLOY_ZIP setting
Diffstat (limited to 'export-image/04-finalise/01-run.sh')
-rwxr-xr-xexport-image/04-finalise/01-run.sh15
1 files changed, 10 insertions, 5 deletions
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"