mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-20 05:36:23 +02:00
lib.sh: condense setvars() a bit
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
+3
-6
@@ -27,13 +27,10 @@ err_()
|
|||||||
|
|
||||||
setvars()
|
setvars()
|
||||||
{
|
{
|
||||||
_setvars=""
|
_setvars="" && [ $# -lt 2 ] && $err "setvars: too few arguments"
|
||||||
[ $# -lt 2 ] && $err "setvars: too few arguments"
|
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; printf "%s\n" "${_setvars% }"
|
||||||
printf "%s\n" "${_setvars% }"
|
|
||||||
}
|
}
|
||||||
chkvars()
|
chkvars()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user