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.
This commit is contained in:
vpeter4 2018-11-21 12:48:00 +01:00
parent 39219f83af
commit 1edd8b4724

View File

@ -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