summaryrefslogtreecommitdiff
path: root/Master/tlpkg/bin/tl-update-txi
blob: 33d18fe8748af6f45359d9767e09e3e00193fd56 (plain)
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/bin/sh -e
# $Id$
# Public domain.  Originally written 2008, Karl Berry.
# 
# From the Texinfo manuals in TeX Live, simplistically build html/pdf,
# install info/html/pdf.  Don't delete info files since they are in the
# dist's.  Unfortunately no easy way to do the same for pdf.

: ${CTAN=/home/ftp/tex-archive}

texihtml="makeinfo --html --no-split"
texipdf="texi2pdf --quiet --clean"

# Convenience variables.
mydir=`dirname $0`
Master=`cd $mydir/../.. && pwd`
docdir=$Master/texmf/doc
infodir=$docdir/info  

Build=`cd $Master/../Build && pwd`
xk=$Build/source/texk
xu=$Build/source/utils

# 
do_dvipng() {
  mypkg=dvipng
  cd $xk/$mypkg/doc || exit 1
  MV=cp mvcp-if-change $mypkg.info $infodir/
  $texihtml $mypkg.texi && mvcp-if-change $mypkg.html $docdir/$mypkg/
  $texipdf $mypkg.texi && mv -v $mypkg.pdf $docdir/$mypkg/
}

# 
do_dvips() {
  mypkg=dvips
  cd $xk/${mypkg}k || exit 1
  MV=cp mvcp-if-change $mypkg.info $infodir/
  $texihtml $mypkg.texi && mvcp-if-change $mypkg.html $docdir/$mypkg/
  if texi2dvi --quiet --clean $mypkg.texi; then
    # raw PostScript examples
    mainmap=$Master/texmf/fonts/map/dvips/updmap/psfonts.map
    dvips -q -t letter -u $mainmap $mypkg.dvi
    /usr/bin/ps2pdf $mypkg.ps
    mv -v $mypkg.pdf $docdir/$mypkg/
    rm $mypkg.dvi $mypkg.ps
  fi
}

# 
do_epspdf() {
  mypkg=epspdf
  cd $Master/texmf-dist/doc/support/$mypkg
  #makeinfo --no-split $mypkg.info
  #mvcp-if-change $mypkg.info $infodir/
  #done as part of package update?
}

# 
do_fontname() {
  mypkg=fontname
  cd $CTAN/info/fontname
  MV=cp mvcp-if-change $mypkg.info $infodir/
}

# 
do_kpathsea() {
  mypkg=kpathsea
  cd $xk/$mypkg/doc || exit 1
  MV=cp mvcp-if-change $mypkg.info $infodir/
  $texihtml $mypkg.texi && mvcp-if-change $mypkg.html $docdir/$mypkg/
  $texipdf $mypkg.texi && mv -v $mypkg.pdf $docdir/$mypkg/
}

# 
do_web2c() {
  mypkg=web2c
  cd $xk/$mypkg/doc || exit 1
  MV=cp mvcp-if-change $mypkg.info $infodir/
  $texihtml $mypkg.texi && mvcp-if-change $mypkg.html $docdir/$mypkg/
  $texipdf $mypkg.texi && mv -v $mypkg.pdf $docdir/$mypkg/
}

do_dvipng
do_dvips
do_epspdf
do_fontname
do_kpathsea
do_web2c

exit $?

# static: tds, texdraw.