blob: c0630fda22157c19f8e604b50fc9bb46fb41501a (
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
|
#!/bin/sh
# read the CTAN catalogue and update the TPM files where possible
Master=`cd \`dirname $0\`/.. && /bin/pwd`
cd $Master || exit 1
test $# -eq 0 && set - `find texmf-dist/tpm -name "*.tpm"`
for i in "$@"; do
echo Try to update $i
p4 edit $i
N=`basename $i .tpm`
L=`echo $N | sed 's/\(.\).*/\1/'`
wget -q -O x.xml \
http://cvs.sarovar.org/cgi-bin/cvsweb.cgi/~checkout~/texcatalogue/entries/$L/$N.xml?cvsroot=texcatalogue
grep -q "<entry" x.xml || echo "<entry/>" > x.xml
xmllint --dropdtd x.xml > /tmp/$N.xml
xsltproc \
-o $N.tpm \
--stringparam sarovar /tmp/$N.xml \
--stringparam authors `pwd`/texmf-doc/doc/english/catalogue/authors.xml \
`pwd`/Tools/tpmfromcat.xsl $i
xmllint --format $N.tpm > $i
rm x.xml /tmp/$N.xml $N.tpm
done
p4 revert -a
|