-
Notifications
You must be signed in to change notification settings - Fork 9
/
make-all
executable file
·82 lines (73 loc) · 2.36 KB
/
make-all
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
set -e
rm -rf tmp-cd tmp-cdhtml tmp-cdom tmp-cdgroups tmp-cdghtml tmp-sts tmp-stshtml
mkdir tmp-cd tmp-cdhtml tmp-cdom tmp-cdgroups tmp-cdghtml tmp-sts tmp-stshtml
echo copying input
cd tmp-cd
cp ../contrib/cd/*.ocd .
cp ../cd/experimental/*.ocd .
cp ../cd/Official/*.ocd .
cd ..
cd tmp-cdgroups
cp ../cdgroups/*.cdg .
cd ..
cd tmp-sts
cp ../contrib/sts/*.sts .
cp ../sts/*.sts .
cd ..
echo generate cd html
java -jar lib/saxon/saxon9he.jar -o:tmp-cdhtml tmp-cd lib/xsl/cd.xsl
echo generate cd om
java -jar lib/saxon/saxon9he.jar -o:tmp-cdom tmp-cd lib/xsl/cd2om.xsl
echo generate sts html
java -jar lib/saxon/saxon9he.jar -o:tmp-stshtml tmp-sts lib/xsl/sts2html.xsl
echo generate cdg html
java -jar lib/saxon/saxon9he.jar -o:tmp-cdghtml tmp-cdgroups lib/xsl/cdgroup.xsl
echo cds.xml
echo "<CDS>" > cds.xml
for d in cd/*/*.ocd contrib/cd/*.ocd
do
echo "<OCD path=\"$d\">" >> cds.xml
cat $d >> cds.xml
echo "</OCD>" >> cds.xml
done
echo "</CDS>" >> cds.xml
sed -i -E s/.*version=\"1.0\".*//g cds.xml
echo cdnames
java -jar lib/saxon/saxon9he.jar -o:cdnames.md cds.xml lib/xsl/cdnames.xsl 2>&1 | grep cds: > stats.yml
java -jar lib/saxon/saxon9he.jar -o:cdnamess.md cds.xml lib/xsl/cdnamess.xsl
echo symbols
java -jar lib/saxon/saxon9he.jar -o:symbols.md cds.xml lib/xsl/index.xsl 2>&1 | grep cdsymbols: >> stats.yml
echo cdgroups
cd tmp-cdgroups
java -jar ../lib/saxon/saxon9he.jar -it:cdg -o:index.md ../lib/xsl/cdgroupindex.xsl cdg="`ls *.cdg`" 2>&1 | grep cdgroups: >> ../stats.yml
cd ..
if [ -d ../OpenMath.github.io/cd ]; then
echo copying to website
cd tmp-cd
for i in *.ocd
do
cp $i ../../OpenMath.github.io/cd
cp ../tmp-cdhtml/${i}.xml ../../OpenMath.github.io/cd/${i/.ocd/.html}
cp ../tmp-cdom/${i}.xml ../../OpenMath.github.io/cd/${i/.ocd/.omcd}
done
cd ..
cd tmp-cdgroups
for i in *.cdg
do
cp $i ../../OpenMath.github.io/cdgroups
cp ../tmp-cdghtml/${i}.xml ../../OpenMath.github.io/cdgroups/${i/.cdg/.html}
done
cd ..
cd tmp-sts
for i in *.sts
do
cp $i ../../OpenMath.github.io/sts
cp ../tmp-stshtml/${i}.xml ../../OpenMath.github.io/sts/${i/.sts/.html}
done
cd ..
cp cdnames.md cdnamess.md symbols.md ../OpenMath.github.io
cp tmp-cdgroups/index.md ../OpenMath.github.io/cdgroups
cp stats.yml ../OpenMath.github.io/_data
else
echo not copying to website
fi