From: Michael Tremer Date: Thu, 1 Dec 2011 09:56:45 +0000 (+0100) Subject: Fix symlinks to compressed man pages. X-Git-Tag: 0.9.18~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4ea1a9a26a0ae3aeff2687c3d30fc725b8e0a4cc;p=pakfire.git Fix symlinks to compressed man pages. --- diff --git a/scripts/compress-man-pages b/scripts/compress-man-pages index 1b250d7a7..e546f4b29 100755 --- a/scripts/compress-man-pages +++ b/scripts/compress-man-pages @@ -1,5 +1,8 @@ #!/bin/bash +COMPRESSOR=xz +COMPRESS_EXT=.xz + echo "Compressing man pages..." BUILDROOT=${1} @@ -18,7 +21,14 @@ for file in $(find ${BUILDROOT}/usr/share/man -type f); do esac echo " Compressing man page ${file//${BUILDROOT}/}..." - xz ${file} + ${COMPRESSOR} ${file} +done + +for file in $(find ${BUILDROOT}/usr/share/man -type l); do + link=$(ls -l ${file} | sed -e 's/.* -> //' -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//') + rm -f ${file} + b=$(echo ${file} | sed -e 's/\.\(gz\|Z\|bz2\|xz\|lzma\)$//') + ln -sf ${link}${COMPRESS_EXT} ${b}${COMPRESS_EXT} done exit 0