diff options
author | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-06-30 11:36:16 +0000 |
---|---|---|
committer | Manuel Pégourié-Gonnard <mpg@elzevir.fr> | 2010-06-30 11:36:16 +0000 |
commit | c0404d22fc3919480d33204c2053503a47a3354e (patch) | |
tree | db8c53e131f98a58cf06a9fe4a9d2001fa3e3006 /Master/texmf-dist/doc/latex/ctable/inst | |
parent | ca6a098e2e1413be5291b8ada623a166843ef436 (diff) |
ctable update 1.16
git-svn-id: svn://tug.org/texlive/trunk@19192 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/latex/ctable/inst')
-rwxr-xr-x | Master/texmf-dist/doc/latex/ctable/inst | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/latex/ctable/inst b/Master/texmf-dist/doc/latex/ctable/inst new file mode 100755 index 00000000000..be3981d5a02 --- /dev/null +++ b/Master/texmf-dist/doc/latex/ctable/inst @@ -0,0 +1,78 @@ +#!/bin/bash + +# this script generates ctable's documentation into ctable.pdf +# and then installs (unless the environment variable NOINSTALL is not empty) +# ctable in TEXMFLOCAL +# This is not a make-like process. If you changed any files, then first run +# inst with the --Clean option, then run inst without options. + +function die { + echo -e "$1" + exit 1 +} + +NAME=ctable +LOCAL=`kpsewhich --expand-var '$TEXMFLOCAL'`/tex/latex/ctable +CLEAN={aux,idx,ilg,chk,fls,ind,log,glo,gls,out,tex} +ALLCLEAN={aux,idx,ilg,chk,fls,ind,log,glo,gls,out,tex,sty,cls,pdf} + +function clean { + eval "rm -f $NAME.$CLEAN doc/*.$CLEAN" +} +function Clean { + eval "rm -f $NAME.$ALLCLEAN doc/*.$ALLCLEAN" +} + +case "$1" +in +-c|--clean) clean; exit;; +-C|--Clean) Clean; exit;; +-h|--help) echo 'Usage: ./inst [-c|C|h]'; exit;; +?*) echo 'Illegal argument(s)'; exit;; +esac + +echo y |tex $NAME.ins >/dev/null +( + # recompile example graphics if any is missing: + cd doc + ln -sf ../ctable.sty || exit 1 # use the ctable.sty version to be installed + for i in [0-9][0-9]?; do + if [ ! -f $i.pdf -o ! -f s$i.pdf ]; then + echo Creating example graphics + ./doit || exit 1 + ./doit -c + break + fi + done + rm ctable.sty + cd .. + + echo Creating documentation + pdflatex --recorder --interaction=batchmode $NAME.dtx || die "`texlog_extract $NAME.log`" + if [ -f $NAME.glo ]; then + makeindex -q -s gglo.ist -o $NAME.gls $NAME.glo || echo makeindex-error + fi + if [ -f $NAME.idx ]; then + makeindex -q -s gind.ist -o $NAME.ind $NAME.idx || exit 1 + fi + pdflatex --recorder --interaction=nonstopmode $NAME.dtx > /dev/null || exit 1 + + # set environment variable NOINSTALL to skip installation in your textree + if [ "$NOINSTALL" = "" ]; then + echo Installing $NAME.{dtx,sty,pdf} + rm -rf $LOCAL + mkdir -p $LOCAL + cp $NAME.{dtx,sty,pdf} $LOCAL || exit 1 + fi + sudo `which mktexlsr` || exit 1 + exit 0 +) +if [ $? != 0 ]; then + echo errors detected, see ctable.log +else + echo ctable successfully installed +fi +texlog_extract ctable + +# $Id: inst,v 1.24 2010-06-26 21:44:29 wybo Exp $ + |