From e8b1d45631d05098d5f45efd2746ca40584a4af2 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 9 Jun 2024 10:55:33 +0100 Subject: [PATCH] lib.sh: simplify singletree() Signed-off-by: Leah Rowe --- include/lib.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/lib.sh b/include/lib.sh index 9d66ea8..fa15bd6 100755 --- a/include/lib.sh +++ b/include/lib.sh @@ -223,8 +223,7 @@ e() singletree() { for targetfile in "config/${1}/"*/target.cfg; do - [ ! -e "$targetfile" ] && continue - [ -f "$targetfile" ] && return 1 + [ -e "$targetfile" ] && [ -f "$targetfile" ] && return 1 done }