2014-07-06 16:15:09 +02:00
|
|
|
# This hook uncompresses man(1) files.
|
|
|
|
|
|
|
|
hook() {
|
|
|
|
local f lnkat mandir=${PKGDESTDIR}/usr/share/man
|
|
|
|
|
|
|
|
if [ ! -d $mandir ] ||
|
|
|
|
[ -z "$(find $mandir -regex '.*\.\(gz\|bz2\)' -print -quit)" ]; then
|
|
|
|
return 0
|
|
|
|
fi
|
|
|
|
|
|
|
|
# rewrite symlinks
|
|
|
|
find $mandir -type l -regex '.*\.\(gz\|bz2\)' | while read f
|
|
|
|
do
|
|
|
|
lnkat=$(readlink "$f")
|
2014-07-12 17:10:40 +02:00
|
|
|
ln -s ${lnkat%.*} ${f%.*}
|
2014-07-06 16:15:09 +02:00
|
|
|
rm $f
|
|
|
|
done
|
|
|
|
|
2018-12-15 17:09:40 +01:00
|
|
|
find $mandir -type f -name '*.gz' -exec gunzip -v -f {} + &>/dev/null
|
|
|
|
find $mandir -type f -name '*.bz2' -exec bunzip2 -v -f {} + &>/dev/null
|
2014-07-06 16:15:09 +02:00
|
|
|
}
|