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