Fix IDs.
[thenextsample.git] / generate.sh
blobe47da53dfef2422dedf76d5af15882357f6afd89
1 withIncludesResolved="`tempfile`"
2 sourceFile="sources.xml"
3 tempFiles="$sourceFile $withIncludesResolved"
5 # Generate the images.
6 ./images.sh
8 xmllint --xinclude --output $withIncludesResolved --schema pottery.xsd pottery.xml || exit 1
10 echo '<?xml version="1.0" encoding="UTF-8"?>' > $sourceFile
11 echo '<sources xmlns="tag:fenglich.fastmail.fm,2007:Pottery">' >> $sourceFile
12 sources=" \
13 glazes.xml \
14 pieces.xml \
15 pottery.xml \
16 pottery.xsd \
17 pottery2docbook.xsl \
18 samples.xml \
19 $0"
20 for source in $sources; do
21 # Yes, the last hash outputted is the latest one.
22 echo "<source href=\"$source\" \
23 gitSHA1=\"`git log --pretty=format:'%h" date="%cd"' $source | tail -n1` \
24 />" >> $sourceFile
25 done
26 echo '</sources>' >> $sourceFile
28 # Let's just check it is ok
29 xmllint --noout $sourceFile || exit 2
31 xsltproc -o pottery.docbook pottery2docbook.xsl $withIncludesResolved || exit 3
33 xmllint --xinclude --noout --schema docbook.xsd pottery.docbook || exit 4
35 cd xhtml/
36 xsltproc --stringparam use.id.as.filename 1 \
37 ../../docbook-xsl-1.73.2/xhtml/chunk.xsl \
38 ../pottery.docbook || exit 5
40 # vim: et:ts=4:sw=4:sts=4