From 2ac2c86d2c1a29496e90c2a1973addd79b53aa27 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 25 Aug 2024 17:19:31 +0200 Subject: [PATCH] spcd_banner_render/loop --- spcd/main.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/spcd/main.sh b/spcd/main.sh index 13f010e..0835f1e 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -1184,10 +1184,12 @@ spcd_banner_render() { spcd_banner_add_index spcd_banner_add "S" # - for spcd_banner__item in "${SPCD_STEP_TEXT}" "${SPCD_SUBSTEP_TEXT}"; do - if [ -n "${spcd_banner__item}" ]; then - spcd_banner_add "${spcd_banner__item}" - fi + unset spcd_br__level + while true; do + spcd_br__level=$((spcd_br__level + 1)) + eval "spcd_br__value=\"\${SPCD_BANNER_${spcd_br__level}_LABEL}\"" + [ -n "${spcd_br__value}" ] || break + spcd_banner_add "${spcd_br__value}" done # spcd_banner_close