summaryrefslogtreecommitdiff
path: root/Master/Tools/update-lists
blob: 5665557bd7cbfafaac9cd63cc2511329d4dfb713 (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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/sh
# $Id: //depot/Master/Tools/update-lists#8 $ $Author: karl $ $Date: 2005/10/08 $
# Created by Sebastian Rahtz, long ago.  Public domain.
# 
# Update the texmf/lists/* files from all the tpm's.

M=`cd \`dirname $0\` && /bin/pwd`
W=`cd \`dirname $0\`/.. && /bin/pwd`
cd $W || exit 1 # work in Master

Date=`date +%Y/%m/%d`
Who=`whoami`

if test "x$1" = x-n; then
  chicken=true
else
  chicken=false
fi

$chicken || rm -f texmf/lists/*

echo "$0: doing packages from $W"
for i in texmf-dist/tpm/*.tpm texmf/tpm/hyphen*tpm texmf/tpm/lib-*.tpm texmf/tpm/bin-*.tpm \
         texmf-doc/tpm/* ; do
 xsltproc --stringparam ROOT $W $M/tpm2list.xsl $i 
done

echo "$0: doing collections..."
for i in texmf/tpm/collection*.tpm; do
 xsltproc --stringparam ROOT $W $M/collection2list.xsl $i
done

echo "$0: doing schemes..."
for i in texmf/tpm/scheme*.tpm; do
 xsltproc --stringparam ROOT $W $M/scheme2list.xsl $i
done

echo "$0: done regenerating lists."
$chicken && exit 0

cd texmf/lists || exit 1
chmod 444 * >&/dev/null # we created them according to umask

find . -type f | p4 -x - add 2>&1 | grep -v add.existing
p4 diff -sd ... | p4 -x - delete
p4 diff -se ... | p4 -x - edit