init.sh setvars: make err a printf for eval
setvars is always invoked with eval, so make the error condition a message for eval, to ensure that it is reliably handled, in case of error condition. Signed-off-by: Leah Rowe <leah@libreboot.org>25.04_branch
parent
3221ca7742
commit
ef78f88117
|
@ -18,7 +18,11 @@ err="err_"
|
||||||
|
|
||||||
setvars()
|
setvars()
|
||||||
{
|
{
|
||||||
_setvars="" && [ $# -lt 2 ] && $err "setvars: too few arguments"
|
_setvars=""
|
||||||
|
if [ $# -lt 2 ]; then
|
||||||
|
printf "\$err \"setvars: too few args\""
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
val="$1" && shift 1 && for var in "$@"; do
|
val="$1" && shift 1 && for var in "$@"; do
|
||||||
_setvars="$var=\"$val\"; $_setvars"
|
_setvars="$var=\"$val\"; $_setvars"
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue