From 43238fa0c5ca017773cdfa75d95479a01004bcf1 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Thu, 27 Jun 2024 14:06:41 +0100 Subject: [PATCH] lib.sh: condense singletree() a bit Signed-off-by: Leah Rowe --- include/lib.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/lib.sh b/include/lib.sh index 5b21d81..a1b6aa0 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()