Removed date part of image name, replaced with command line args
This commit is contained in:
parent
766837b833
commit
c3c2c6dca2
|
@ -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 - <<EOF
|
||||
/etc/init.d/fake-hwclock stop
|
||||
|
@ -26,9 +26,9 @@ unmount_image ${IMG_FILE}
|
|||
|
||||
mkdir -p ${DEPLOY_DIR}
|
||||
|
||||
rm -f ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip
|
||||
rm -f ${DEPLOY_DIR}/${IMG_NAME}${IMG_SUFFIX}.zip
|
||||
|
||||
echo zip ${DEPLOY_DIR}/image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.zip ${IMG_FILE}
|
||||
echo zip ${DEPLOY_DIR}/${IMG_NAME}${IMG_SUFFIX}.zip ${IMG_FILE}
|
||||
pushd ${STAGE_WORK_DIR} > /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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user