Commit | Line | Data |
---|---|---|
12fa1ef8 IJ |
1 | #!/bin/sh |
2 | set -e | |
4ff07717 | 3 | |
12fa1ef8 | 4 | . /usr/share/debconf/confmodule |
6cc0cac2 IJ |
5 | |
6 | #DEBHELPER# | |
7 | ||
b9008d6d | 8 | aliasfile=/etc/X11/fonts/misc/xfonts-base.alias |
4ff07717 IJ |
9 | |
10 | check_aliasfile () { | |
4ff07717 IJ |
11 | if ! test -f $aliasfile; then return; fi |
12 | if test -e $aliasfile.not-trad; then return; fi | |
13 | ||
14 | perl -pe ' | |
b9008d6d | 15 | s/^(fixed\s+)\-misc\-(fixed-medium-r-semicondensed)/$1-trad-$2/ |
4ff07717 IJ |
16 | ' <$aliasfile >$aliasfile.trad |
17 | if cmp -s $aliasfile $aliasfile.trad; then | |
18 | rm $aliasfile.trad | |
19 | return | |
20 | fi | |
21 | db_get xfonts-traditional/remap-fixed | |
22 | if [ $RET != true ]; then return; fi | |
23 | ||
b9008d6d | 24 | echo 'Installing traditional variant of "fixed"...' |
4ff07717 IJ |
25 | ln $aliasfile $aliasfile.not-trad |
26 | mv -f $aliasfile.trad $aliasfile | |
27 | ||
b9008d6d IJ |
28 | update-fonts-alias misc |
29 | ||
3b5a8fd8 | 30 | db_set xfonts-traditional/remap-fixed false |
4ff07717 IJ |
31 | # only ever do this once |
32 | } | |
33 | ||
34 | db_get xfonts-traditional/generate | |
35 | if [ "$RET" = true ]; then | |
36 | ||
37 | update-xfonts-traditional --update | |
38 | ||
39 | check_aliasfile | |
40 | ||
41 | fi |