summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-26 13:49:55 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-26 13:49:55 +0100
commitdee6997d0cc13e95b9a911efef0687b0ac582edd (patch)
tree51a26e6424201ab0a28bef4868fd6341539da01d
parent79ded40f3d0f123ce2dbddba524aaae76764c699 (diff)
lib.sh: simplify setvars()
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/lib.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/lib.sh b/include/lib.sh
index 822f1abc..86c0df26 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -53,12 +53,10 @@ setvars()
fi
val="$1"
shift 1
- while true; do
- [ $# -lt 1 ] && break
- _setvars="$1=\"$val\"; $_setvars"
+ while [ $# -gt 0 ]; do
+ printf "%s=\"%s\"\n" "$1" "$val"
shift 1
done
- printf "%s\n" "${_setvars% }"
}
setcfg()