Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions pkgs/build-support/setup-hooks/compress-man-pages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,9 @@ compressManPages() {
echo "gzipping man pages under $dir/share/man/"

# Compress all uncompressed manpages. Don't follow symlinks, etc.
# gzip -f is needed to not error out on hard links.
find "$dir"/share/man/ -type f -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \
| while IFS= read -r -d $'\0' f
do
if gzip -c -n "$f" > "$f".gz; then
rm "$f"
else
rm "$f".gz
fi
done
| xargs -0 -n1 -P "$NIX_BUILD_CORES" gzip -f

# Point symlinks to compressed manpages.
find "$dir"/share/man/ -type l -a '!' -regex '.*\.\(bz2\|gz\|xz\)$' -print0 \
Expand Down