summaryrefslogtreecommitdiffstats
path: root/japanese/monafonts-ttf/pkg-deinstall
blob: 0f2f4b70ba2dbba05a656face74b3d55e064ff57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
if [ "$2" != "DEINSTALL" ]; then
  exit 0
fi
FONTDIR=${PKG_PREFIX}/lib/X11/fonts/TrueType
cd ${FONTDIR}
sed -e '/-mona-/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
OpenPOWER on IntegriCloud