From 8e48438b395629e92c0b01ef79620142ef87fd21 Mon Sep 17 00:00:00 2001 From: Antonis Kalipetis Date: Tue, 7 Oct 2025 18:55:26 +0300 Subject: [PATCH] feat(installer): fix styling to scale according to the name width --- installer.sh | 79 ++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 64 insertions(+), 15 deletions(-) diff --git a/installer.sh b/installer.sh index 476fd99..288408a 100644 --- a/installer.sh +++ b/installer.sh @@ -96,12 +96,65 @@ function output { builtin echo -e "${style_start}${1}${style_end}" } +function create_table_line() { + local text="${1:-}" + local width="${2:-}" + + if [ -z "$width" ]; then + # Calculate width based on text length, minimum 50 + local text_length=${#text} + width=$((text_length < 50 ? 50 : text_length + 4)) + fi + + if [ "$text" = "border" ] || [ -z "$text" ]; then + # Border line + printf "+" + for ((i=0; i