This commit is contained in:
Marc Beninca 2024-08-26 14:47:50 +02:00
parent ceeb7337a2
commit 535d3479a6
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -10,6 +10,7 @@
[ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd" [ -n "${SPCD_GIT_MAIN}" ] || SPCD_GIT_MAIN="spcd"
[ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx" [ -n "${SPCD_GIT_ROOT}" ] || SPCD_GIT_ROOT="rwx"
[ -n "${SPCD_GIT_SHUNIT}" ] || SPCD_GIT_SHUNIT="shunit2" [ -n "${SPCD_GIT_SHUNIT}" ] || SPCD_GIT_SHUNIT="shunit2"
[ -n "${SPCD_REF_FEATURE}" ] || SPCD_REF_FEATURE="f" [ -n "${SPCD_REF_FEATURE}" ] || SPCD_REF_FEATURE="f"
@ -39,11 +40,11 @@
# │ internals │ # │ internals │
# ╰───────────╯ # ╰───────────╯
spcd_fill() { _spcd_fill() {
spcd_fill__index=${1} _spcd_fill__index=${1}
while [ "${spcd_fill__index}" -gt 0 ]; do while [ "${_spcd_fill__index}" -gt 0 ]; do
printf "%s" "${2}" printf "%s" "${2}"
spcd_fill__index=$((spcd_fill__index - 1)) _spcd_fill__index=$((_spcd_fill__index - 1))
done done
} }
@ -65,7 +66,7 @@ spcd_banner_add() {
spcd_ba__text=" ${1} " spcd_ba__text=" ${1} "
spcd_ba__length=${#spcd_ba__text} spcd_ba__length=${#spcd_ba__text}
spcd_ba__filler="$( spcd_ba__filler="$(
spcd_fill "${spcd_ba__length}" "${SPCD_BANNER_HORIZONTAL}" _spcd_fill "${spcd_ba__length}" "${SPCD_BANNER_HORIZONTAL}"
)" )"
if [ -n "${SPCD_BANNER_MIDDLE}" ]; then if [ -n "${SPCD_BANNER_MIDDLE}" ]; then
spcd_banner_split spcd_banner_split