X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=xfonts-traditional.git;a=blobdiff_plain;f=debian%2Fxfonts-traditional.prerm;h=7578f5250491227af21748ef7441bd33f90ce31a;hp=5cb9a991199e0151ab052fda5818a9e87ed99e91;hb=4e1c892a5260cbb9f0ffabf3adf20b40c45e6099;hpb=489ffe219bed26ff9669f17750c08d4d9f867b60 diff --git a/debian/xfonts-traditional.prerm b/debian/xfonts-traditional.prerm index 5cb9a99..7578f52 100755 --- a/debian/xfonts-traditional.prerm +++ b/debian/xfonts-traditional.prerm @@ -3,42 +3,48 @@ set -e . /usr/share/debconf/confmodule -case "$1" in - -remove) +#DEBHELPER# - echo 'Checking that "fixed" is not from xfonts-traditional..." +/usr/share/xfonts-traditional/checkfiles prerm "$@" - if grep '^fixed[ ][ ]*-trad-'; then - cat >&2 <&2 + exit 1 + fi fi - find /usr/share/fonts/X11 /usr/local/share/fonts/X11 \ - -type f \ - \( -name xfonts-traditional.log -o \ - -name xfonts-traditional.done -o - -name xfonts-traditional.done.new -o - -name trad--\*.pcf.gz.new \) \ - -print0 | xargs -0r rm - - find /usr/share/fonts/X11 /usr/local/share/fonts/X11 \ - -type f \ - -name trad--\*.pcf.gz \ - -print0 | xargs -0r rm + for d in /usr/share/fonts/X11 /usr/local/share/fonts/X11; do + if ! test -e "$d"; then continue; fi + + find "$d" \ + -type f \ + \( -name xfonts-traditional.log -o \ + -name xfonts-traditional.done -o \ + -name xfonts-traditional.done.new -o \ + -name trad--\*.pcf.gz.new \) \ + -print0 | xargs -0r rm -- + + find "$d" \ + -type f \ + -name trad--\*.pcf.gz \ + -print0 | xargs -0r rm -- + done ;;