| 1 | #!/bin/sh |
| 2 | set -e |
| 3 | |
| 4 | . /usr/share/debconf/confmodule |
| 5 | |
| 6 | #DEBHELPER# |
| 7 | |
| 8 | aliasfile=/etc/X11/fonts/misc/xfonts-base.alias |
| 9 | |
| 10 | check_aliasfile () { |
| 11 | if ! test -f $aliasfile; then return; fi |
| 12 | if test -e $aliasfile.not-trad; then return; fi |
| 13 | |
| 14 | perl -pe ' |
| 15 | s/^(fixed\s+)\-misc\-(fixed-medium-r-semicondensed)/$1-trad-$2/ |
| 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 | |
| 24 | echo 'Installing traditional variant of "fixed"...' |
| 25 | ln $aliasfile $aliasfile.not-trad |
| 26 | mv -f $aliasfile.trad $aliasfile |
| 27 | |
| 28 | update-fonts-alias misc |
| 29 | |
| 30 | db_set xfonts-traditional/remap-fixed false |
| 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 |