summaryrefslogtreecommitdiff
path: root/japanese/kanji18/files/DEINSTALL.tmpl
blob: 42902c4e620591e6856531728ddd8d44a7258139 (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
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/sh

grepv() {
	awk -v SRC=$1 'BEGIN{while (getline < SRC) {ENTRY[$0]=1}} (ENTRY[$0] != 1) {print}' $2
}

if [ "x$2" = "xPOST-DEINSTALL" ]; then
	FONTDIR=%%FONTSDIR%%

	# font alias entry here!
	TMPFILE=/tmp/install-fonts-alias-$$
	cat <<- EOF > ${TMPFILE}
	kanji18  -jis-gothic-medium-r-normal--18-170-75-75-c-180-jisx0208.1983-0
	kanji18b  -jis-gothic-bold-r-normal--18-170-75-75-c-180-jisx0208.1983-0
	kanji18i  -jis-gothic-medium-i-normal--18-170-75-75-c-180-jisx0208.1983-0
	kanji18bi  -jis-gothic-bold-i-normal--18-170-75-75-c-180-jisx0208.1983-0
	-jis-fixed-medium-r-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-medium-r-normal--18-130-100-100-c-180-jisx0208.1983-0
	-jis-fixed-bold-r-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-bold-r-normal--18-130-100-100-c-180-jisx0208.1983-0
	-jis-fixed-medium-i-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-medium-i-normal--18-130-100-100-c-180-jisx0208.1983-0
	-jis-fixed-bold-i-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-bold-i-normal--18-130-100-100-c-180-jisx0208.1983-0
	-jis-fixed-medium-r-normal--18-170-75-75-c-180-jisx0208.1983-0 -jis-gothic-medium-r-normal--18-170-75-75-c-180-jisx0208.1983-0
	-jis-fixed-bold-r-normal--18-170-75-75-c-180-jisx0208.1983-0 -jis-gothic-bold-r-normal--18-170-75-75-c-180-jisx0208.1983-0
	-jis-fixed-medium-i-normal--18-170-75-75-c-180-jisx0208.1983-0 -jis-gothic-medium-i-normal--18-170-75-75-c-180-jisx0208.1983-0
	-jis-fixed-bold-i-normal--18-170-75-75-c-180-jisx0208.1983-0 -jis-gothic-bold-i-normal--18-170-75-75-c-180-jisx0208.1983-0
	-jis-gothic-medium-r-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-medium-r-normal--18-170-75-75-c-180-jisx0208.1983-0
	-jis-gothic-bold-r-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-bold-r-normal--18-170-75-75-c-180-jisx0208.1983-0
	-jis-gothic-medium-i-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-medium-i-normal--18-170-75-75-c-180-jisx0208.1983-0
	-jis-gothic-bold-i-normal--18-130-100-100-c-180-jisx0208.1983-0 -jis-gothic-bold-i-normal--18-170-75-75-c-180-jisx0208.1983-0
	EOF
	echo "Updating ${FONTDIR}/fonts.alias"
	cd ${FONTDIR}
	touch fonts.alias
	cp fonts.alias fonts.alias.orig
	grepv ${TMPFILE} fonts.alias.orig > fonts.alias
	if [ ! -s fonts.alias ]; then rm -f fonts.alias; fi
	rm -f fonts.alias.orig ${TMPFILE}

	%%LOCALBASE%%/bin/xset fp rehash ||
	(
	 echo "**********************************************************"
	 echo "You should restart X server or do 'xset fp rehash' command"
	 echo "to enable this update."
	 echo "**********************************************************"
	)
fi