tree.sh: don't delete builds if tree==target

in that case, the previous tree-wide check will cover
it, so the current logic wastes computational time.

this patch therefore somewhat optimises the code.

Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
Leah Rowe
2025-08-04 09:18:04 +01:00
parent 1c5c28f2cb
commit ef79b11082
+3 -3
View File
@@ -184,9 +184,9 @@ check_project_hashes()
# check only the given target; delete only the target build
# if that's all that changed (not applicable to single-tree)
singletree "$project" || [ -z "$target" ] || \
check_hashes tghash "$target" badtghash "$configdir/$target" || \
x_ rm -Rf "elf/$project/$tree/$target"; :
singletree "$project" || [ -z "$target" ] || [ "$target" = "$tree" ] \
|| check_hashes tghash "$target" badtghash "$configdir/$target" \
|| x_ rm -Rf "elf/$project/$tree/$target"; :
}
check_hashes()