local/names

This commit is contained in:
Marc Beninca 2024-09-01 17:01:00 +02:00
parent 29a33e5787
commit d9f4ea7e25
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -53,9 +53,7 @@ _spcd_banner_add() {
} }
_spcd_banner_add_index() { _spcd_banner_add_index() {
local label local level value label
local level
local value
while true; do while true; do
level=$((level + 1)) level=$((level + 1))
eval "value=\"\${__SPCD_STEP_${level}_INDEX}\"" eval "value=\"\${__SPCD_STEP_${level}_INDEX}\""
@ -96,8 +94,7 @@ _spcd_banner_render() {
_spcd_banner_add "S" _spcd_banner_add "S"
_spcd_banner_add_index _spcd_banner_add_index
# #
local level local level value
local value
while true; do while true; do
level=$((level + 1)) level=$((level + 1))
eval "value=\"\${__SPCD_STEP_${level}_LABEL}\"" eval "value=\"\${__SPCD_STEP_${level}_LABEL}\""
@ -257,8 +254,7 @@ spcd_os_mkdir() {
spcd_os_printenv() { spcd_os_printenv() {
if [ -n "${1}" ]; then if [ -n "${1}" ]; then
local name local name text
local text
for name in "${@}"; do for name in "${@}"; do
eval "text=\"\${${name}}\"" eval "text=\"\${${name}}\""
echo "${name} = \"${text}\"" echo "${name} = \"${text}\""
@ -348,8 +344,7 @@ spcd_txt_get() {
spcd_txt_locale() { spcd_txt_locale() {
# LANGUAGE # LANGUAGE
local name local value name
local value
if [ -n "${1}" ]; then if [ -n "${1}" ]; then
value="${1}" value="${1}"
else else
@ -423,9 +418,7 @@ spcd_step__environment_defaults_print() {
"URL_PYTHON" \ "URL_PYTHON" \
"URL_ROCKY" \ "URL_ROCKY" \
"URL_UBUNTU" "URL_UBUNTU"
local item local item name value
local name
local value
for item in "${@}"; do for item in "${@}"; do
name="SPCD_${item}" name="SPCD_${item}"
eval "value=\"\${${name}}\"" eval "value=\"\${${name}}\""