diff options
author | Leah Rowe <leah@libreboot.org> | 2025-08-04 09:18:04 +0100 |
---|---|---|
committer | Leah Rowe <leah@libreboot.org> | 2025-08-04 09:33:33 +0100 |
commit | ef79b1108294cad62d90d02a598c18b64f1632db (patch) | |
tree | bdb7cdc79b6030fcd64c4fd2597341d42517c161 /include/tree.sh | |
parent | 1c5c28f2cb2d2e553a248631fb27f45ecab6e958 (diff) |
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>
Diffstat (limited to 'include/tree.sh')
-rw-r--r-- | include/tree.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/tree.sh b/include/tree.sh index f534a8fb..ed361623 100644 --- a/include/tree.sh +++ b/include/tree.sh @@ -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() |