]>
git.ipfire.org Git - people/ms/pakfire.git/blob - tools/compress-man-pages
6 echo "Compressing man pages..."
11 dir
="${BUILDROOT}/usr/share/man"
13 for file in $
(find ${dir} -type f
2>/dev
/null
); do
14 [ -f "${file}" ] ||
continue
27 echo " Compressing man page ${file//${BUILDROOT}/}..."
28 ${COMPRESSOR} ${file} </dev
/null
2>/dev
/null ||
{
29 # Handle files with hardlinks.
30 others
=$
(find ${dir} -type f
-samefile ${file})
31 if [ -n "${others}" ]; then
32 for afile
in ${others}; do
33 [ "${afile}" != "${file}" ] && rm -f ${afile}
35 ${COMPRESSOR} -f ${file}
36 for afile in ${others}; do
37 [ "${afile}" != "${file}" ] && ln ${file}${COMPRESS_EXT} ${afile}${COMPRESS_EXT}
40 ${COMPRESSOR} -f ${file}
45 for file in $
(find ${dir} -type l
2>/dev
/null
); do
46 link
=$
(ls -l ${file} |
sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//')
48 b
=$
(echo ${file} |
sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//')
49 ln -sf ${link}${COMPRESS_EXT} ${b}${COMPRESS_EXT}