banner/index

This commit is contained in:
Marc Beninca 2024-08-31 00:59:35 +02:00
parent 835ad7279c
commit f257864aba
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -40,19 +40,20 @@ _spcd_banner_add() {
}
_spcd_banner_add_index() {
unset spcd_bai__label
unset spcd_bai__level
local label
local level
local value
while true; do
spcd_bai__level=$((spcd_bai__level + 1))
eval "spcd_bai__value=\"\${__SPCD_STEP_${spcd_bai__level}_INDEX}\""
[ -n "${spcd_bai__value}" ] || break
if [ -n "${spcd_bai__label}" ]; then
spcd_bai__label="${spcd_bai__label}.${spcd_bai__value}"
level=$((level + 1))
eval "value=\"\${__SPCD_STEP_${level}_INDEX}\""
[ -n "${value}" ] || break
if [ -n "${label}" ]; then
label="${label}.${value}"
else
spcd_bai__label="${spcd_bai__value}"
label="${value}"
fi
done
_spcd_banner_add "${spcd_bai__label}"
_spcd_banner_add "${label}"
}
_spcd_banner_append() {