summaryrefslogtreecommitdiff
path: root/Build/tools/tpmfromcat
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-02-13 00:49:47 +0000
committerKarl Berry <karl@freefriends.org>2006-02-13 00:49:47 +0000
commit045f872c421bb96d9e680ccd7f79c823cef10521 (patch)
tree20483574ec8846ce1adb25e905f4a0b4e2505a41 /Build/tools/tpmfromcat
parenta1e47d103e66e2a947105dd7378e8df3918c3f62 (diff)
move Master/Tools to Build/tools
git-svn-id: svn://tug.org/texlive/trunk@1514 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/tools/tpmfromcat')
-rwxr-xr-xBuild/tools/tpmfromcat24
1 files changed, 24 insertions, 0 deletions
diff --git a/Build/tools/tpmfromcat b/Build/tools/tpmfromcat
new file mode 100755
index 00000000000..c0630fda221
--- /dev/null
+++ b/Build/tools/tpmfromcat
@@ -0,0 +1,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