From 1edd8b47243da1915aa355c9cccd18cdbe4c5fa3 Mon Sep 17 00:00:00 2001 From: vpeter4 Date: Wed, 21 Nov 2018 12:48:00 +0100 Subject: [PATCH] scripts/mkimage: show message when temp folder is full If temporary folder is full error message can't be saved and shown to the user which doesn't know what the problem actually is. In this case file is empty and show other message. --- scripts/mkimage | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/mkimage b/scripts/mkimage index 0162506322..5f419a6d90 100755 --- a/scripts/mkimage +++ b/scripts/mkimage @@ -39,11 +39,16 @@ cleanup() { } show_error() { - echo -e "image: error happen...\n" - cat "${SAVE_ERROR}" + echo "image: An error has occurred..." echo + if [ -s "${SAVE_ERROR}" ]; then + cat "${SAVE_ERROR}" + else + echo "Folder $LE_TMP might be out of free space..." + fi + echo cleanup - exit 1 + die } trap cleanup SIGINT