From f3d5b5c46435e992afc3b4a58efc7f614f33f178 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Fri, 23 Aug 2024 23:03:18 +0200 Subject: [PATCH] spcd_banner_add_123 --- spcd/main.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/spcd/main.sh b/spcd/main.sh index 7b829c6..a816a7f 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -832,9 +832,16 @@ spcd_banner_add() { spcd_ba__text=" ${1} " spcd_ba__length=${#spcd_ba__text} spcd_ba__filler="$(spcd_fill "${spcd_ba__length}" ─)" - SPCD_BANNER_1="${SPCD_BANNER_1}${spcd_ba__filler}" - SPCD_BANNER_2="${SPCD_BANNER_2}${spcd_ba__text}" - SPCD_BANNER_3="${SPCD_BANNER_3}${spcd_ba__filler}" + spcd_banner_add_123 \ + "${spcd_ba__filler}" "${spcd_ba__text}" "${spcd_ba__filler}" + fi +} + +spcd_banner_add_123() { + if [ -n "${3}" ]; then + SPCD_BANNER_1="${SPCD_BANNER_1}${1}" + SPCD_BANNER_2="${SPCD_BANNER_2}${2}" + SPCD_BANNER_3="${SPCD_BANNER_3}${3}" fi }