From 6fc7cd3c17f2284768e4a0416ecaa67f71da8052 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 27 Jun 2024 14:06:41 +0100 Subject: lib.sh: condense singletree() a bit Signed-off-by: Leah Rowe --- include/lib.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/lib.sh b/include/lib.sh index 5b21d81c..a1b6aa0d 100755 --- a/include/lib.sh +++ b/include/lib.sh @@ -183,9 +183,8 @@ rmgit() singletree() { for targetfile in "config/${1}/"*/target.cfg; do - [ -e "$targetfile" ] || continue - [ -f "$targetfile" ] && return 1 - done + [ -e "$targetfile" ] && [ -f "$targetfile" ] && return 1 + done; return 0 } download() -- cgit v1.2.1