build-vm: proper cleanup for *.img

We should delete the tarball whenever it's not the target.
This commit is contained in:
Ivan A. Melnikov 2019-02-22 12:42:23 +04:00 committed by Michael Shigorin
parent 7f1ec09c9b
commit dab41865b2

View File

@ -39,7 +39,10 @@ prepare-image: check-sudo
convert-image: prepare-image
@VM_COMPRESS=; \
case "$(IMAGE_TYPE)" in \
"img") mv "$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; exit 0;; \
"img") \
mv "$(VM_RAWDISK)" "$(IMAGE_OUTPATH)"; \
if [ "0$(DEBUG)" -le 1 ]; then rm "$(VM_TARBALL)"; fi; \
exit 0;; \
"vhd") VM_FORMAT="vpc";; \
"qcow2c") VM_FORMAT="qcow2"; VM_COMPRESS="-c";; \
*) VM_FORMAT="$(IMAGE_TYPE)"; \