summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-26 13:45:12 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-26 13:45:12 +0100
commit79ded40f3d0f123ce2dbddba524aaae76764c699 (patch)
treeda9de1171ef78b6d0137cdf648ed7feefa64c329 /include
parent5036a0bc501b5b26d429701a8e9dd71339ec18a0 (diff)
lib.sh: simplify chkvars()
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'include')
-rw-r--r--include/lib.sh6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/lib.sh b/include/lib.sh
index 7c4d71ea..822f1abc 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -71,11 +71,9 @@ setcfg()
chkvars()
{
- while true; do
- [ $# -lt 1 ] && break
+ while [ $# -gt 0 ]; do
eval "[ -n \"\${$1+x}\" ] || err \"$1 unset\""
- eval "[ -n \"\$$1\" ] || err \"$1 unset\""
- shift 1
+ eval "[ -n \"\$$1\" ] || err \"$1 unset\"; shift 1; :"
done; :
}