aboutsummaryrefslogblamecommitdiff
path: root/x11-fonts/cyberbit-ttfonts/pkg-deinstall
blob: 53303469e7e8b1b5eb5ac26d0d50b0a7f6ea4c59 (plain) (tree)
1
2
3
4
5
6
7
8
9








                                                      
                               

                                    
                   


                             
#!/bin/sh
XFLDNAME="-Bitstream-Bitstream\ Cyberbit-"
if [ "$2" != "DEINSTALL" ]; then
  exit 0
fi
FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
cd ${FONTDIR}
sed -e "/${XFLDNAME}/d" fonts.dir > fonts.dir.tmp
numfonts=$(echo $(cat fonts.dir.tmp | wc -l) - 1 | bc)
if [ ${numfonts} != "0" ]; then
echo ${numfonts} > fonts.dir
sed -e 1d fonts.dir.tmp >> fonts.dir
rm -f fonts.dir.tmp
else
rm -f fonts.dir fonts.dir.tmp
fi