mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 05:52:36 +02:00
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>
This commit is contained in:
+5
-1
@@ -18,7 +18,11 @@ err="err_"
|
||||
|
||||
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
|
||||
_setvars="$var=\"$val\"; $_setvars"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user