From 4f112d1c41a4739a6bf7ba3d488ceedac3675c1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Wed, 10 Oct 2018 17:53:17 +0200 Subject: [PATCH] card-helpers.inc: Output a better default message for card part case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Andreas Müller --- scripts/include/card-helpers.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/include/card-helpers.inc b/scripts/include/card-helpers.inc index 215223f..171bbad 100644 --- a/scripts/include/card-helpers.inc +++ b/scripts/include/card-helpers.inc @@ -245,7 +245,11 @@ RunUserStartRoot() { echo "${style_bold}${style_red}IMPORTANT: THIS is YOUR LAST EXIT...${style_normal}" if [ "x$1" = "x" ] ; then # No message text passed: use standard - echo "${style_bold}All data on $DevicePath will be overwritten by $DeployedFile${style_normal}" + if [ -n "$DeployedFile" ]; then + echo "${style_bold}All data on $DevicePath will be overwritten by $DeployedFile${style_normal}" + else + echo "${style_bold}All data on $DevicePath will be erased${style_normal}" + fi else # Use message text passed echo $1 | sed "s|\%DevicePath\%|$DevicePath|" | sed "s|\%DeployedFile\%|$DeployedFile|"