aboutsummaryrefslogtreecommitdiffstats
path: root/chinese/wangttf/pkg-deinstall
blob: 41d36045d4d316c442db29352eecd17c57e1d1c6 (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

# No default kai & ming for wangttf.
FONTDIR=${PREFIX}/share/fonts/TrueType
FONTS="wcl-01.ttf wcl-02.ttf wcl-03.ttf wcl-04.ttf wcl-05.ttf \
       wcl-06.ttf wcl-07.ttf wcl-08.ttf wcl-09.ttf wcl-10.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