summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2024-06-09 10:49:58 +0100
committerLeah Rowe <leah@libreboot.org>2024-06-09 10:49:58 +0100
commit9cdf419295a248e8853ca7c9cc98df90990aca6c (patch)
tree95897b20193f7043934c474966a7e47393a6527c
parent1cede024d6c2c6964dbbeb7dca51af5bb01e9714 (diff)
git.sh: further simplify nuke()
it's a very compact nuke Signed-off-by: Leah Rowe <leah@libreboot.org>
-rwxr-xr-xinclude/git.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/git.sh b/include/git.sh
index f362450d..f0f6f210 100755
--- a/include/git.sh
+++ b/include/git.sh
@@ -180,9 +180,7 @@ move_repo()
# called from script/trees when downloading sources.
nuke()
{
- e "config/${1%/}/nuke.list" f missing && return 0
-
- while read -r nukefile; do
+ e "config/${1%/}/nuke.list" f missing || while read -r nukefile; do
rmf="${2%/}/$nukefile" && [ -L "$rmf" ] && continue
e "$rmf" e missing || rm -Rf "$rmf" || $err "!rm $rmf, ${2%/}"
done < "config/${1%/}/nuke.list"; return 0