lib.sh: simplify singletree()

Signed-off-by: Leah Rowe <leah@libreboot.org>
25.04_branch
Leah Rowe 2025-05-05 15:40:08 +01:00
parent 9d91c3da60
commit e2f6e7a410
1 changed files with 1 additions and 3 deletions

View File

@ -148,9 +148,7 @@ chkvars()
# e.g. coreboot is multi-tree, so 1
singletree()
{
for targetfile in "config/${1}/"*/target.cfg; do
[ -e "$targetfile" ] && [ -f "$targetfile" ] && return 1; :
done; :
( fe_ "exit 1" "config/$1/"*/ -type f -name "target.cfg" ) || return 1
}
fe_()