summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/isodoc/inst
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/latex/isodoc/inst')
-rw-r--r--Master/texmf-dist/doc/latex/isodoc/inst22
1 files changed, 16 insertions, 6 deletions
diff --git a/Master/texmf-dist/doc/latex/isodoc/inst b/Master/texmf-dist/doc/latex/isodoc/inst
index a2d66124f91..d458c8a2c62 100644
--- a/Master/texmf-dist/doc/latex/isodoc/inst
+++ b/Master/texmf-dist/doc/latex/isodoc/inst
@@ -3,7 +3,7 @@
NAME=isodoc
DOCTYPE=class
EXT=cls
- VERSION=`grep " v[0-9.]\+ $NAME $DOCTYPE" $NAME.dtx |sed 's/.* v\([0-9.]\+\) .*/\1/' `
+ VERSION=`grep " v[0-9.]\+[a-z]\{,1\} $NAME $DOCTYPE" $NAME.dtx |sed 's/.* v\([0-9.]\+[a-z]\{,1\}\) .*/\1/' `
EXECUTABLES=(pdfseparate zip unzip getopt)
function die {
@@ -21,7 +21,6 @@ function help {
-z, --zip Create zip for CTAN (developer only)
Without any options, inst creates $NAME.{$EXT,ins,pdf} and installs these,
- together with isodocsymbols.sty,
in the local TeX tree (\$TEXMFLOCAL) or, if that is not writable,
in the userĀ“s TeX tree (\$TEXMFHOME). Also, a zip file is created for upload to CTAN.
EOD
@@ -45,8 +44,17 @@ function testexecs { # test presence of executables
}
function readme { # generate the README file
- sed -n "/^%<\*readme>/,/^%<\/readme>/p;/\\\\changes{v$VERSION}/,/^% }/p" $NAME.dtx |
- sed "s/^%//;s/\\\\\\\\$//;/<.readme>/d;/^ }/d;s/ \\\\changes.*/Changes in version $VERSION:/" >README
+sed -n '/^%<\*readme>/,/^%<\/readme>/p
+ /\\changes{v'$VERSION'}/,/^% }/p' $NAME.dtx |
+sed 's/^%//;s/\\\\$//
+ /<.readme>/d
+ /^ }/d
+ s/ \\changes.*/Changes in version '$VERSION':/
+ s/$\\Rightarrow\$/=>/g
+ s/\\textbackslash/\\/g
+ s/\\text\(sl\|it\){\([^}]\+\)}/\/\2\//g # \textsl{...} -> /.../
+ s/{\([^}]*\)}/\1/g # keep last, removes all {...}
+ ' >README
}
function clean { # clean but keep what goes in the zip
@@ -70,8 +78,10 @@ function makeall {
cd examples
for i in *; do
+ # skip dirs that aren't yet added:
+ test "$(hg st $i|wc -l)" = "$(ls $i|wc -l)" && continue
cd $i
- for j in ../../{$NAME.cls,isodocsymbols.sty,languages/isodoc*.ldf}; do ln -sf $j; done
+ for j in ../../{$NAME.cls,languages/isodoc*.ldf}; do ln -sf $j; done
read TEX <$i.tex
if [[ $TEX =~ ^%! ]]; then TEX=${TEX#%!}; else TEX=pdflatex;fi
$TEX --interaction=batchmode $i >/dev/null || die error compiling $i
@@ -93,7 +103,7 @@ function installall {
# install and cleanup
echo installing in $INSTDIR
mv -f $NAME.{$EXT,pdf} $INSTDIR
- cp -a isodocsymbols.sty languages $INSTDIR
+ cp -a languages $INSTDIR
cp -a $NAME.{ins,dtx} $SOURCE
mktexlsr $TREE 2>/dev/null
clean