From 592b2bc064a7a5f86652ba2d7fa77fc715d50188 Mon Sep 17 00:00:00 2001 From: Artem Smirnov Date: Wed, 28 Apr 2021 15:24:15 +0400 Subject: [PATCH] Don't delete base zip image after unpack error --- img-tool | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/img-tool b/img-tool index c0a4d14..0a09e3a 100755 --- a/img-tool +++ b/img-tool @@ -309,10 +309,7 @@ load() { rich_echo "Unzipping Linux distribution image" "BLUE" \ && unzip -p ${IMG_DIR}/${RPI_ZIP_NAME} ${RPI_IMAGE_NAME} > ${IMG_PATH} \ && rich_echo "Unzipping completed" "GREEN" \ - || ( - rich_echo "Unzipping failed!" "RED"; - rm ${IMG_DIR}/${RPI_ZIP_NAME} && rich_echo "Zip-file was removed" "RED"; - exit 1) + || (rich_echo "Unzipping failed! Check your base image" "RED"; exit 1) } exec() {