summaryrefslogtreecommitdiff
path: root/autoscripts/postrm-xfonts
blob: 29cec43590754312e11bd10e3c2972d7ca172a93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
makefontdir() {
    ENCDIR=/usr/lib/X11/fonts/encodings
    if [ -d $ENCDIR -a -d $ENCDIR/large ]; then
	/usr/bin/X11/mkfontdir -e $ENCDIR -e $ENCDIR/large "$@"
    else
	/usr/bin/X11/mkfontdir "$@"
    fi
}

fontdirs="#FONTDIRS#"
updatecmds="#UPDATECMDS#"

if [ "$1" = "purge" -o "$1" = "remove" -o "$1" = "disappear" ]; then
	for currentdir in $fontdirs; do
		longdir=/usr/lib/X11/fonts/$currentdir
		if [ -d $longdir ]; then
			for currentcmd in $updatecmds; do
				$currentcmd $longdir
			done
		fi
	done
fi