lib.sh: stricter check in chkvars()

testing +x is all well and good, but the variable string
may be empty, even if set. some of the checks in the build
system are relying on the latter, so handle it.

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2
Leah Rowe 2024-06-28 22:32:03 +01:00 committed by Leah Rowe
parent 203fdb8007
commit 7322a2b53d
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ chkvars()
{
for var in $@; do
eval "[ -n "\${$var+x}" ] || \$err \"$var unset\""
eval "[ -n "\$$var" ] || \$err \"$var unset\""
done; return 0
}