summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/isodoc/inst
blob: b309d4e3104c1d997379f76f6149427c33ec2294 (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
#!/bin/sh

# this script creates and installs the isodoc class and its
# documentation

# inst            : create everything
# inst clean      : clean up, except pdf files
# inst cleanall   : remove all that can be restored, but keep isodoc.{pdf,cls}

# The script needs:
# mk        http://www.ctan.org/tex-archive/support/latex_maker
# vpp       http://www.ctan.org/tex-archive/support/view_print_ps_pdf/
# unzip     unzip-5.52-14.rpm
# uudecode  sharutils-4.6-13.rpm


NAME=isodoc
LOCAL=/local/texmf/tex/latex     # my local tex dir

function clean() {
  mk -c $NAME
  mk -c letter
  mk -c logoletter
  mk -c ntgletter
  mk -c invoice
  mk -c accept
  rm -f chopin* texnan* *.png *.jpg *.txt # these are in binaries.m64
}

function cleanall() {
  clean
  mv isodoc.pdf $$
  rm -f *.pdf
  mv $$ isodoc.pdf
}

# binary files are stored cvs as a mime64-encoded zip file binaries.m64
# pack binaries, if necessary, with:
#   zip -m binaries chopin* texnan* *.jpg *.png
#   uunecode binaries.zip <binaries.zip > binaries.m64
#   rm binaries.zip
# but don't forget to add the original $Id...$ line on top of the new encoded file

if [ "$1" = 'clean' ]; then
  clean
elif [ "$1" = 'cleanall' ]; then
  cleanall
elif [ "$1" = 'tar' ]; then
  cleanall
  version=`grep ' v[0-9.]\+ isodoc class' isodoc.dtx |sed 's/.* v\([0-9.]\+\) .*/\1/' `
  tarfile=isodoc-$version.tar.gz
  tar cvzf $tarfile --exclude=CVS --exclude=$tarfile *
else
  if [ ! -e acceptform.jpg ]; then
    echo unpack binaries
    uudecode binaries.m64
    unzip -q binaries
    rm binaries.zip
  fi

  # make verbinput files without $Id-lines
  for i in `grep -l '$\(Id\): ' *.{tex,sty}`; do
    grep -v '$\(Id\): ' $i >${i%.???}.txt
  done
  
  echo y |tex $NAME.ins >/dev/null
  mk --noview --noprint letter
  mk --noview --noprint logoletter
  vpp --noview --batch='1 ologo1' logoletter.pdf
  vpp --noview --batch='2 ologo2' logoletter.pdf
  mk --noview --noprint ntgletter
  mk --noview --noprint invoice
  mk --noview --noprint accept
  pdflatex --interaction=batchmode $NAME.dtx > /dev/null
  makeindex -q -s gglo.ist -o $NAME.gls $NAME.glo
  makeindex -q -s gind.ist -o $NAME.ind $NAME.idx
  pdflatex --interaction=batchmode $NAME.dtx > /dev/null
  
  sudo cp $NAME.{dtx,cls,pdf} $LOCAL       # install in local tex tree
  sudo mktexlsr
fi

# $Id: inst,v 1.8 2006/11/07 09:36:02 wybo Exp $