mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-13 18:50:31 +00:00
abuild: minor speed improvement in symlink compression
instead of forking stat once force every file with one file argument, we fork it once with all the files as arg. This reduces number of forks.
This commit is contained in:
parent
eee56356ab
commit
a2c0a6897e
@ -1419,7 +1419,7 @@ default_doc() {
|
||||
[ -d "$mandir" ] && find "$mandir" -type f \
|
||||
-a \( -name \*.[0-8n] -o -name \*.[0-8][a-z]* \) \
|
||||
-a \! \( -name '*.gz' -o -name '*.bz2' -o -name '*.xz' \) \
|
||||
-exec stat -c "%i %n" \{\} \; | while read inode name; do
|
||||
-exec stat -c "%i %n" \{\} \+ | while read inode name; do
|
||||
|
||||
# Skip hardlinks removed in last iteration.
|
||||
[ -f "$name" ] || continue
|
||||
@ -1428,7 +1428,7 @@ default_doc() {
|
||||
find "$mandir" -type f -links +1 \
|
||||
-a \( -name \*.[0-8n] -o -name \*.[0-8][a-z]* \) \
|
||||
-a \! \( -name '*.gz' -o -name '*.bz2' -o -name '*.xz' \) \
|
||||
-exec stat -c "%i %n" \{\} \; | while read linode lname; do
|
||||
-exec stat -c "%i %n" \{\} \+ | while read linode lname; do
|
||||
if [ "$linode" = "$inode" -a "$lname" != "$name" ]; then
|
||||
islink=1
|
||||
rm -f "$lname"
|
||||
|
Loading…
Reference in New Issue
Block a user