We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ca81772 + 8d022c6 commit c5252e1Copy full SHA for c5252e1
1 file changed
pkgs/build-support/setup-hooks/compress-man-pages.sh
@@ -9,15 +9,9 @@ compressManPages() {
9
echo "gzipping man pages under $dir/share/man/"
10
11
# Compress all uncompressed manpages. Don't follow symlinks, etc.
12
+ # gzip -f is needed to not error out on hard links.
13
find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \
- | while IFS= read -r -d $'\0' f
14
- do
15
- if gzip -c -n "$f" > "$f".gz; then
16
- rm "$f"
17
- else
18
- rm "$f".gz
19
- fi
20
- done
+ | xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -f
21
22
# Point symlinks to compressed manpages.
23
find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \
0 commit comments