2 # run from the prerm and postinst
8 .
/usr
/share
/debconf
/confmodule
10 gen_file_overwrite
() {
11 before
=$1; after
=$2; infile
=$3; outfile
=$4; backupmode
=$5; backup
=$6
13 s/^('"$regexp"'\s+)\-'$before'\-(fixed-medium-r-semicondensed)/$1-'$after'-$2/
14 ' <$infile >$outfile.tmp
15 if cmp -s
$outfile.tmp
$outfile; then
19 echo " Updating $file ($before=>$after)..."
22 if ! test -e
$backup; then
29 mv -f
$outfile.tmp
$outfile
32 *.
alias) update-fonts-alias misc
;;
37 dckey
=$1; regexp
=$2; file=$3
39 if ! test -f
$file; then return; fi
43 case "$script.$mode" in
45 db_get xfonts-traditional
/$dckey ||
:
46 if [ $RET = true
]; then
47 gen_file_overwrite misc trad \
48 $file $file once
$file.backup.not-trad
51 gen_file_overwrite misc trad \
52 $file $file.trad never
61 echo >&2 "huh $script.mode ?"
65 if $needundo && test -f
$file.backup.not-trad
; then
66 gen_file_overwrite trad misc \
67 $file $file $file.backup.trad
68 mv -f
$file.backup.not-trad
$file.old.not-trad
70 # only ever do this once, unless we've actually undone it since
73 echo "Checking configuration..."
75 check_file reconfigure-xterm
'\*VT100\.utf8Fonts\.font\:' \
76 /etc
/X11
/app-defaults
/XTerm
78 check_file remap-fixed
'fixed' \
79 /etc
/X11
/fonts
/misc
/xfonts-base.
alias