summaryrefslogtreecommitdiff
path: root/chinese/arphicttf/pkg-deinstall
blob: c29500f46075770c8c6baaa329120c29c295dafb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh

if [ "$2" != "DEINSTALL" ]; then
  exit 0
fi

PKGNAME=$1
PREFIX=${PKG_PREFIX}
TTFM=${PKG_PREFIX}/bin/ttfm.sh

FONTDIR=${PREFIX}/share/fonts/TrueType
FONTS="bkai00mp.ttf bsmi00lp.ttf gbsn00lp.ttf gkai00mp.ttf"
DEFAULTMING="default_ming-big5-0.ttf default_ming-gb2312.1980-0.ttf"
DEFAULTKAI="default_kai-big5-0.ttf default_kai-gb2312.1980-0.ttf"

if [ -r $FONTDIR/$PKGNAME ]; then
    for i in `cat $FONTDIR/$PKGNAME`; do
        for f in $FONTS $DEFAULTMING $DEFAULTKAI; do
            $TTFM --remove $i $f
        done
    done
fi

rm -f $FONTDIR/$PKGNAME

exit 0