shutils/pkgtarget: speed up build dir cleanup.
We need `chmod -R` to be able to cleanup after Go packages, but it's unnecessary in most other cases. By only running it when the first `rm -rf` fails, we optimize for the most common case and get a tiny speedup for this build step.
This commit is contained in:
parent
bd4fb68ea5
commit
d7bf8e06a0
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ remove_pkg_autodeps() {
|
|||
remove_pkg_wrksrc() {
|
||||
if [ -d "$wrksrc" ]; then
|
||||
msg_normal "$pkgver: cleaning build directory...\n"
|
||||
chmod -R +wX "$wrksrc" # Needed to delete Go Modules
|
||||
rm -rf "$wrksrc" || chmod -R +wX "$wrksrc" # Needed to delete Go Modules
|
||||
rm -rf "$wrksrc"
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue