Skip to content

Commit

Permalink
shell check fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mtekman authored and MichaIng committed Nov 13, 2022
1 parent c003e03 commit 943f123
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dietpi/func/dietpi-banner
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
local title="$1" ## Bold part before ":"
local descp="$2" ## Normal part after ":"

if [ -v WORD_WRAP ]; then
if [[ $WORD_WRAP == 1 ]]; then
## Strip invisible colour codes in order to accurately measure the visual length
## of a sentence.
local stripped_title="${title//$COLOUR_STRIP/}"
Expand All @@ -127,7 +127,7 @@
fi

local avail_len=$(( ($TERM_WIDTH - $title_len) - 1))
local left_pad=$(printf -- " %.0s" $(seq 0 $title_len))
local left_pad=$(printf -- " %.0s" $(seq 0 "$title_len"))

## The description is typically very long, and is folded from the second line
## onwards into the remaining available space, with left padding.
Expand Down

0 comments on commit 943f123

Please sign in to comment.