File: prerm

package info (click to toggle)
ptex-jisfonts 2-21
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 240 kB
  • ctags: 7
  • sloc: sh: 176; makefile: 74
file content (44 lines) | stat: -rw-r--r-- 874 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#! /bin/sh
# prerm script for ptex-jisfonts
#
# see: dh_installdeb(1)

set -e

cfgsh=/usr/sbin/jisftconfig

pdfm=/etc/texmf/dvipdfm/fontmaps
pdfmx=/etc/texmf/dvipdfm/fontmapsx

case "$1" in
    remove)

# for dvipdfm
    if [ -f ${pdfm} ] ; then
    sed -e '/%-- ptex-jisfonts begin/,/%-- ptex-jisfonts end/d' < ${pdfm} > \
    ${pdfm}_$$ && mv -f ${pdfm}_$$ ${pdfm}
    fi

# for dvipdfmx
    if [ -f ${pdfmx} ] ; then
    sed -e '/%-- ptex-jisfonts begin/,/%-- ptex-jisfonts end/d' < ${pdfmx} > \
    ${pdfmx}_$$ && mv -f ${pdfmx}_$$ ${pdfmx}
    fi

    ${cfgsh} remove
    ${cfgsh} clean
        ;;
    upgrade|deconfigure|failed-upgrade)
        ;;
    *)
        echo "prerm called with unknown argument \`$1'" >&2
        exit 0
    ;;
esac

# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.

#DEBHELPER#

exit 0