git.sh: further simplify nuke()

it's a very compact nuke

Signed-off-by: Leah Rowe <leah@libreboot.org>
20240612_branch
Leah Rowe 2024-06-09 10:49:58 +01:00
parent 1cede024d6
commit 9cdf419295
1 changed files with 1 additions and 3 deletions

View File

@ -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