#!/bin/sh # this script creates and installs the isodoc class and its # documentation # inst : create everything, install in local tree, make zip for CTAN # inst clean : remove all that can be restored # inst zip : make a zip file for CTAN # 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() { # remove all that can be restored, # except isodoc.cls and isodoc.pdf for i in *.tex; do mk -C $i done mk -c isodoc rm -f chopin* texnan* *.png *.jpg # these are in binaries.m64 rm -f logo[12].pdf *.txt } # 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.m64 # rm binaries.zip # but don't forget to add the original $Id...$ line on top of the new encoded file case "$1" in clean) clean rm -f isodoc.cls isodoc.pdf ;; zip) echo make zip clean version=`grep ' v[0-9.]\+ isodoc class' isodoc.dtx |sed 's/.* v\([0-9.]\+\) .*/\1/' ` zipfile=isodoc-$version.zip zip -Dq $zipfile * ;; "") echo unpack binaries uudecode binaries.m64 unzip -q binaries rm binaries.zip # make verbinput files without $Id-lines echo make example files for i in `grep -l '$\(Id\): ' *.{tex,sty}`; do grep -v '$\(Id\): ' $i >${i%.???}.txt done echo y |tex $NAME.ins >/dev/null for i in *.tex; do mk --noview --noprint $i done vpp --noview --batch='1 ologo1' logoletter.pdf vpp --noview --batch='2 ologo2' logoletter.pdf echo make documentation 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 echo install in local tree sudo cp $NAME.{dtx,cls,pdf} $LOCAL # install in local tex tree sudo mktexlsr ;; *) echo illegal argument exit 1 ;; esac # $Id: inst,v 1.10 2007/08/21 22:21:00 wybo Exp $