From 4ea1a9a26a0ae3aeff2687c3d30fc725b8e0a4cc Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Thu, 1 Dec 2011 10:56:45 +0100 Subject: [PATCH] Fix symlinks to compressed man pages. --- scripts/compress-man-pages | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- 2.39.5