summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-05-15 03:53:26 +0100
committerLeah Rowe <leah@libreboot.org>2024-05-15 03:53:26 +0100
commit350857fff3e4300dad38c8b322188517dd7cb0da (patch)
treec5ba913bea302a9a8c5a1cbeff332b4027696027
parent8e05399d9114efc422e75bfc477887013c6840df (diff)
build: simplify for loop in fetch_trees()
Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xbuild6
1 files changed, 2 insertions, 4 deletions
diff --git a/build b/build
index 6d720f86..15389d7f 100755
--- a/build
+++ b/build
@@ -185,10 +185,8 @@ fetch_trees()
done
for x in config/*/build.list; do
- [ -f "${x}" ] || continue
- xp="${x#*/}"; xp="${xp%/*}"
- [ -L "${xp}" ] || rm -Rf "src/${xp}/${xp}" || \
- $err "!rm -Rf \"src/${xp}/${xp}\""
+ [ -f "$x" ] && xp="${x#*/}" && xp="${xp%/*}"
+ [ ! -f "$x" ] || [ -L "$xp" ] || x_ rm -Rf "src/$xp/$xp"
done
find . -name ".git" -exec rm -Rf {} + || $err "$_xm: rm .git"