summaryrefslogtreecommitdiffstats
path: root/research
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2016-02-28 16:43:12 (EST)
committer P. J. McDermott <pj@pehjota.net>2016-02-28 16:43:12 (EST)
commit395886dfbad28cff608e48172d0a23e9f65836b7 (patch)
treec87d99e41da13293af4f48b059829976f51018b1 /research
parentc5dcb8919ca048eef84af3eb605f40a41a1a819b (diff)
downloadeggshell-395886dfbad28cff608e48172d0a23e9f65836b7.zip
eggshell-395886dfbad28cff608e48172d0a23e9f65836b7.tar.gz
eggshell-395886dfbad28cff608e48172d0a23e9f65836b7.tar.bz2
research: Try storing local vars in eval'd array
Diffstat (limited to 'research')
-rw-r--r--research/research6.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/research/research6.sh b/research/research6.sh
index 3b7d28a..8025ddb 100644
--- a/research/research6.sh
+++ b/research/research6.sh
@@ -72,16 +72,16 @@ __fn_ctxsw()
case "${__prev_vars}" in ?*)
unset ${__prev_vars}
;; esac
- eval "${__fn_var_vals}"
+ for __var in ${__fn_vars}; do
+ eval "${__var}=\${__fn_vars_${__fn_name}__${__var}}"
+ done
}
__fn_update_vars()
{
unset IFS
for __var in ${__fn_vars}; do
- __val="$(eval "printf '%s' \"\${${__var}}\"" | \
- sed "s|'|'\\\\''|g;")"
- __fn_var_vals="${__fn_var_vals} ${__var}='${__val}'"
+ eval "__fn_vars_${__fn_name}__${__var}=\${${__var}}"
done
}