1#!/bin/sh
2
3case $2 in
4POST-INSTALL)
5	cd %%FONTSDIR%%
6	touch fonts.dir
7	sed -e '/-mikachan-/d' fonts.dir > fonts.dir.tmp
8	numfonts=$(echo $(cat fonts.dir.tmp %%DIRFILE%% | wc -l) - 2 | bc)
9	echo ${numfonts} > fonts.dir
10	sed -e 1d fonts.dir.tmp >> fonts.dir
11	sed -e 1d %%DIRFILE%% >> fonts.dir
12	rm -f fonts.dir.tmp fonts.alias.tmp
13;;
14DEINSTALL)
15	cd %%FONTSDIR%%
16	touch fonts.dir
17	sed -e '/-mikachan-/d' fonts.dir > fonts.dir.tmp
18	numfonts=$(echo $(cat fonts.dir.tmp | wc -l) - 2 | bc)
19	echo ${numfonts} > fonts.dir
20	sed -e 1d fonts.dir.tmp >> fonts.dir
21;;
22esac
23