File: preinst

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 (36 lines) | stat: -rw-r--r-- 636 bytes parent folder | download | duplicates (5)
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
#! /bin/sh
# preinst script for ptex-jisfonts
#
# see: dh_installdeb(1)

set -e

map=/etc/texmf/vfontmap

case "$1" in
    install|upgrade)
    # remove old (wrong) setting.
    if [ -f "${map}" ] ; then
      if ! grep -q "#-- ptex-jisfonts begin" ${map}; then
	if grep -q "^jis" ${map}; then
	sed -e '/^jis/d' < ${map} > ${map}_$$ && mv -f ${map}_$$ ${map}
	fi
      fi
    fi
    ;;

    abort-upgrade)
    ;;

    *)
        echo "preinst 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