lib.sh: condense singletree() a bit

Signed-off-by: Leah Rowe <leah@libreboot.org>
audit2
Leah Rowe 2024-06-27 14:06:41 +01:00 committed by Leah Rowe
parent de331e5da0
commit 43238fa0c5
1 changed files with 2 additions and 3 deletions

View File

@ -183,9 +183,8 @@ rmgit()
singletree() singletree()
{ {
for targetfile in "config/${1}/"*/target.cfg; do for targetfile in "config/${1}/"*/target.cfg; do
[ -e "$targetfile" ] || continue [ -e "$targetfile" ] && [ -f "$targetfile" ] && return 1
[ -f "$targetfile" ] && return 1 done; return 0
done
} }
download() download()