From e0552167bf5716a3c4743a25eebf2c4c711ac6ab Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 31 Aug 2024 01:10:37 +0200 Subject: [PATCH] os/printenv --- spcd/bootstrap.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index fcaa398..8133189 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -243,10 +243,11 @@ spcd_os_mkdir() { spcd_os_printenv() { if [ -n "${1}" ]; then - for spcd_os_printenv__name in "${@}"; do - spcd_os_printenv__text="" - eval "spcd_os_printenv__text=\"\${${spcd_os_printenv__name}}\"" - echo "${spcd_os_printenv__name} = \"${spcd_os_printenv__text}\"" + local name + local text + for name in "${@}"; do + eval "text=\"\${${name}}\"" + echo "${name} = \"${text}\"" done fi }