Merge "Support multiple outputs disk formats"

This commit is contained in:
Jenkins 2013-02-27 00:02:26 +00:00 committed by Gerrit Code Review
commit 619153bdf4

View File

@ -166,7 +166,8 @@ function finalise_base () {
function compress_image () {
# Recreate our image to throw away unnecessary data
qemu-img convert ${COMPRESS_IMAGE:+-c} $TMP_IMAGE_PATH -O qcow2 $TMP_IMAGE_PATH-new
test $IMAGE_TYPE != qcow2 && COMPRESS_IMAGE=""
qemu-img convert ${COMPRESS_IMAGE:+-c} $TMP_IMAGE_PATH -O $IMAGE_TYPE $TMP_IMAGE_PATH-new
rm $TMP_IMAGE_PATH
mv $TMP_IMAGE_PATH-new $TMP_IMAGE_PATH
}