File: context.postinst

package info (click to toggle)
context 2012.05.30.20120611-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 53,828 kB
  • sloc: xml: 104,137; ruby: 15,598; perl: 1,893; ansic: 146; makefile: 145; sh: 69
file content (45 lines) | stat: -rwxr-xr-x 1,108 bytes parent folder | download
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
45
#!/bin/sh
set -e

dhit_libkpathsea_configured ()
{
    kpsewhich --version >/dev/null 2>&1
}

case "$1" in
  configure)
    if dhit_libkpathsea_configured; then
      tempfile=$(mktemp -p /tmp mtxrun.XXXXXXXX)
      printf "Running mtxrun --generate. This may take some time... "
      if mtxrun --generate > $tempfile 2>&1 ; then
        rm -f $tempfile
        echo "done."
      else
        exec >&2
        echo
        echo "mtxrun --generate failed. Output has been stored in"
        echo "$tempfile"
        echo "Please include this file if you report a bug."
        echo
        exit 1
      fi
      tempfile=$(mktemp -p /tmp luatools.XXXXXXXX)
      printf "Pregenerating ConTeXt MarkIV format. This may take some time... "
      if luatools --make cont-en > $tempfile 2>&1 ; then
        rm -f $tempfile
        echo "done."
      else
        exec >&2
        echo
        echo "luatools --make cont-en failed. Output has been stored in"
        echo "$tempfile"
        echo "Please include this file if you report a bug."
        echo
        exit 1
      fi
    fi
  ;;
esac

#DEBHELPER#