chiark / gitweb /
more packaging
[xfonts-traditional.git] / debian / xfonts-traditional.prerm
1 #!/bin/sh
2 set -e
3
4 . /usr/share/debconf/confmodule
5
6 case "$1" in
7
8 remove)
9
10         echo 'Checking that "fixed" is not from xfonts-traditional..."
11
12         if grep '^fixed[         ][      ]*-trad-'; then
13                 cat >&2 <<END
14 You should not remove xfonts-traditional while "fixed" refers to one
15 of its fonts.  You probably want to check the differences between
16 /etc/X11/fonts/misc/xfonts-base.alias and xfonts-base.alias.not-trad,
17 and probably replace the former with the latter, and retry the removal.
18 END
19                 exit 1
20         fi
21
22         ;;
23
24         find /usr/share/fonts/X11 /usr/local/share/fonts/X11 \
25                    -type f \
26                 \( -name xfonts-traditional.log -o \
27                    -name xfonts-traditional.done -o 
28                    -name xfonts-traditional.done.new -o 
29                    -name trad--\*.pcf.gz.new \) \
30                 -print0 | xargs -0r rm
31
32         find /usr/share/fonts/X11 /usr/local/share/fonts/X11 \
33                    -type f \
34                    -name trad--\*.pcf.gz \
35                 -print0 | xargs -0r rm
36
37 esac