summaryrefslogtreecommitdiffstats
path: root/abuild.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-02-03 19:04:50 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-02-03 19:33:35 +0000
commita2c0a6897eefcf48bfefaadb1716c07d7efccd74 (patch)
tree1e23ad20947dde29f97115a448d8e11651d881ad /abuild.in
parenteee56356ab0703bf63973be962113bf4866fac2f (diff)
downloadabuild-a2c0a6897eefcf48bfefaadb1716c07d7efccd74.tar.bz2
abuild-a2c0a6897eefcf48bfefaadb1716c07d7efccd74.tar.xz
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.
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/abuild.in b/abuild.in
index 92f5096..00befde 100644
--- a/abuild.in
+++ b/abuild.in
@@ -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"