From d9f4ea7e25a24f5c2f3b45d7a4a1cbf190c6705f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 1 Sep 2024 17:01:00 +0200 Subject: [PATCH] local/names --- spcd/bootstrap.sh | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index 0df0ad6..7aba2c8 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -53,9 +53,7 @@ _spcd_banner_add() { } _spcd_banner_add_index() { - local label - local level - local value + local level value label while true; do level=$((level + 1)) eval "value=\"\${__SPCD_STEP_${level}_INDEX}\"" @@ -96,8 +94,7 @@ _spcd_banner_render() { _spcd_banner_add "S" _spcd_banner_add_index # - local level - local value + local level value while true; do level=$((level + 1)) eval "value=\"\${__SPCD_STEP_${level}_LABEL}\"" @@ -257,8 +254,7 @@ spcd_os_mkdir() { spcd_os_printenv() { if [ -n "${1}" ]; then - local name - local text + local name text for name in "${@}"; do eval "text=\"\${${name}}\"" echo "${name} = \"${text}\"" @@ -348,8 +344,7 @@ spcd_txt_get() { spcd_txt_locale() { # LANGUAGE - local name - local value + local value name if [ -n "${1}" ]; then value="${1}" else @@ -423,9 +418,7 @@ spcd_step__environment_defaults_print() { "URL_PYTHON" \ "URL_ROCKY" \ "URL_UBUNTU" - local item - local name - local value + local item name value for item in "${@}"; do name="SPCD_${item}" eval "value=\"\${${name}}\""