chiark / gitweb /
fix up some lintian things
[xfonts-traditional] / debian / xfonts-traditional.prerm
CommitLineData
12fa1ef8
IJ
1#!/bin/sh
2set -e
3
4. /usr/share/debconf/confmodule
6cc0cac2
IJ
5
6#DEBHELPER#
7
b9008d6d 8aliasfile=/etc/X11/fonts/misc/xfonts-base.alias
12fa1ef8
IJ
9
10case "$1" in
11
12remove)
13
fb8fab66 14 echo 'Checking that "fixed" is not from xfonts-traditional...'
12fa1ef8 15
b9008d6d
IJ
16 if grep '^fixed[ ][ ]*-trad-' $aliasfile \
17 /usr/share/fonts/X11/misc/fonts.alias; then
fb8fab66 18 cat >&2 <<'END'
b9008d6d 19
489ffe21 20Removing xfonts-traditional would break your X server by removing "fixed".
4ff07717 21
12fa1ef8
IJ
22You should not remove xfonts-traditional while "fixed" refers to one
23of its fonts. You probably want to check the differences between
24/etc/X11/fonts/misc/xfonts-base.alias and xfonts-base.alias.not-trad,
b9008d6d
IJ
25reconcile any changes, and then run "update-fonts-alias misc".
26After that you can retry the removal.
4ff07717 27
12fa1ef8 28END
4ff07717 29 printf 'Continue anyway ? [n/y] '
b9008d6d 30 read x </dev/tty
4ff07717
IJ
31 case "$x" in
32 y*|Y*) ;;
33 *) exit 1 ;;
34 esac
12fa1ef8
IJ
35 fi
36
b9008d6d
IJ
37 for d in /usr/share/fonts/X11 /usr/local/share/fonts/X11; do
38 if ! test -e "$d"; then continue; fi
39
40 find "$d" \
41 -type f \
42 \( -name xfonts-traditional.log -o \
43 -name xfonts-traditional.done -o \
44 -name xfonts-traditional.done.new -o \
45 -name trad--\*.pcf.gz.new \) \
46 -print0 | xargs -0r rm --
47
48 find "$d" \
49 -type f \
50 -name trad--\*.pcf.gz \
51 -print0 | xargs -0r rm --
52 done
12fa1ef8 53
489ffe21
IJ
54 ;;
55
12fa1ef8 56esac