summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2025-05-05 15:40:08 +0100
committerLeah Rowe <leah@libreboot.org>2025-05-05 15:40:08 +0100
commit437ac2454c1a6a77c40894379f5073b4412d0c8d (patch)
tree5fc2d8fa84cf329a113098a3339b9601c2a42ed2
parent62ec3dac07584d6ab8e7f86587e730b3d159e8ef (diff)
lib.sh: simplify singletree()
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rw-r--r--include/lib.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/lib.sh b/include/lib.sh
index 1830356e..b8f99674 100644
--- a/include/lib.sh
+++ b/include/lib.sh
@@ -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_()