chiark / gitweb /
wip packaging
[xfonts-traditional] / debian / xfonts-traditional.postinst
... / ...
CommitLineData
1#!/bin/sh
2set -e
3
4. /usr/share/debconf/confmodule
5
6check_aliasfile () {
7 aliasfile=/etc/X11/fonts/misc/xfonts-base.alias
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 ln $aliasfile $aliasfile.not-trad
22 mv -f $aliasfile.trad $aliasfile
23
24 db_put xfonts-traditional/remap-fixed false
25 # only ever do this once
26}
27
28db_get xfonts-traditional/generate
29if [ "$RET" = true ]; then
30
31 update-xfonts-traditional --update
32
33 check_aliasfile
34
35fi