summaryrefslogblamecommitdiff
path: root/x11-fonts/cyberbit-ttfonts/pkg-install
blob: 398687475ca885695e25af5598d4bcdbfccb8248 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                            
                   
#!/bin/sh
XFLDNAME="-Bitstream-Bitstream Cyberbit-"
FONTNAME=cyberbit
FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
if [ "$2" = "PRE-INSTALL" ]; then
  echo "Please add ${FONTDIR} to your /etc/x11/xorg.conf file"
  exit 0
fi
cd ${FONTDIR}
touch fonts.dir
sed -e "/${XFLDNAME}/d" fonts.dir > fonts.dir.tmp
numfonts=$(echo $(cat fonts.dir.tmp fonts.dir.${FONTNAME} | wc -l) - 2 | bc)
echo ${numfonts} > fonts.dir
sed -e 1d fonts.dir.tmp >> fonts.dir
sed -e 1d fonts.dir.$FONTNAME >> fonts.dir
rm -f fonts.dir.tmp