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