rio: update to 0.2.0
[void-pkg.git] / common / hooks / post-install / 00-uncompress-manpages.sh
blob3c0d2e2392e2955a0dd9e2c09458ed39cabbb0b6
1 # This hook uncompresses man(1) files.
3 hook() {
4 local f lnkat mandir=${PKGDESTDIR}/usr/share/man
6 if [ ! -d $mandir ] ||
7 [ -z "$(find $mandir -regex '.*\.\(gz\|bz2\)' -print -quit)" ]; then
8 return 0
9 fi
11 # rewrite symlinks
12 find $mandir -type l -regex '.*\.\(gz\|bz2\)' | while read -r f; do
13 lnkat=$(readlink "$f")
14 ln -s ${lnkat%.*} ${f%.*}
15 rm $f
16 done
18 find $mandir -type f -name '*.gz' -exec gunzip -v -f {} + &>/dev/null
19 find $mandir -type f -name '*.bz2' -exec bunzip2 -v -f {} + &>/dev/null