summaryrefslogtreecommitdiffstats
path: root/chinese/cwtexttf/pkg-install
blob: 74462935ee8040b68c1544040c547339ee518094 (plain)
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
27
28
29
30
31
32
33
34
35
#!/bin/sh

if [ "$2" = "PRE-INSTALL" ]; then
  exit 0
fi

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

FONTDIR=${PREFIX}/share/fonts/TrueType
FONTS="bbttf.ttf fttf.ttf kttf.ttf mttf.ttf rttf.ttf"

if [ ! -x $TTFM ]; then
    echo "$TTFM not found!"
    exit 1
fi

rm -f $FONTDIR/$PKGNAME

if [ "X$WANT_GS" != "X" ]; then
    for f in $FONTS; do
        $TTFM --add gscjk $FONTDIR/$f
    done
    echo "gscjk" >> $FONTDIR/$PKGNAME
fi

if [ "X$WITHOUT_X" = "X" ]; then
    for f in $FONTS; do
        $TTFM --add xttfm $FONTDIR/$f
    done
    echo "xttfm" >> $FONTDIR/$PKGNAME
fi

exit 0
OpenPOWER on IntegriCloud