diff --git a/dietpi/func/dietpi-banner b/dietpi/func/dietpi-banner index 6fdbe34869..2ee0835630 100755 --- a/dietpi/func/dietpi-banner +++ b/dietpi/func/dietpi-banner @@ -122,7 +122,8 @@ title=$(echo "$stripped_title" | fold -s -w $TERM_WIDTH) title="${title//$'\n'/$'\n' }" title="${aCOLOUR[1]}${title}$COLOUR_RESET" - title_len=$(( (($title_len + 3) % $TERM_WIDTH) + 3 )) ## leftover minus paddding + ## Recalculate the title length based on the last line with padding + title_len=$(( (($title_len + 3) % $TERM_WIDTH) + 3 )) fi local avail_len=$(( ($TERM_WIDTH - $title_len) - 1)) @@ -131,7 +132,7 @@ ## The description is typically very long, and is folded from the second line ## onwards into the remaining available space, with left padding. if (( $descp_len >= $avail_len )); then - descp=$(echo ""$stripped_descp"" | fold -s -w $avail_len) + descp=$(echo "$stripped_descp" | fold -s -w $avail_len) descp="${descp//$'\n'/$'\n'${left_pad}}" fi fi