mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-24 11:29:10 +00:00
Fix incorrect return status if var_to_set and var_to_get are the same.
This commit is contained in:
parent
9680f649c5
commit
2a2674499e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=262898
@ -270,9 +270,9 @@ f_getvar()
|
||||
{
|
||||
local __var_to_get="$1" __var_to_set="$2"
|
||||
[ "$__var_to_set" ] || local value
|
||||
eval ${__var_to_set:-value}=\"\${$__var_to_get}\"
|
||||
eval [ \"\${$__var_to_get+set}\" ]
|
||||
local __retval=$?
|
||||
eval ${__var_to_set:-value}=\"\${$__var_to_get}\"
|
||||
eval f_dprintf '"f_getvar: var=[%s] value=[%s] r=%u"' \
|
||||
\"\$__var_to_get\" \"\$${__var_to_set:-value}\" \$__retval
|
||||
[ "$__var_to_set" ] || { [ "$value" ] && echo "$value"; }
|
||||
|
Loading…
Reference in New Issue
Block a user