-
Notifications
You must be signed in to change notification settings - Fork 11
/
make-new
executable file
·45 lines (30 loc) · 998 Bytes
/
make-new
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
#!/usr/bin/bash
if [ ! -f UnicodeData-16.0.0.txt ] ; then
wget https://www.unicode.org/Public/16.0.0/ucd/UnicodeData-16.0.0.txt
# mv UnicodeData.txt UnicodeData-15.0.0.txt
# mv UnicodeData-16.0.0.txt UnicodeData-15.0.0.txt
fi
if [ ! -f Blocks-16.0.0.txt ] ; then
wget https://www.unicode.org/Public/16.0.0/ucd/Blocks-16.0.0.txt
# mv Blocks.txt Blocks-15.0.0.txt
# mv Blocks-15.0.0d3.txt Blocks-15.0.0.txt
fi
if [ ! -f MathClass-15.txt ] ; then
wget http://www.unicode.org/Public/math/revision-15/MathClass-15.txt
fi
TEMPLATE=${1-main}
echo "--- $TEMPLATE ---"
SAXON="java -jar saxon9he.jar "
$SAXON -it:$TEMPLATE unicodedata.xsl
# $SAXON -it:main unicodedata.xsl
# $SAXON -it:mathclass unicodedata.xsl
# $SAXON -it:unicode-math unicodedata.xsl
# $SAXON -it:opdict unicodedata.xsl
if [ $? != 0 ] ; then
echo XSLT error
exit
fi
# put long attributes back on same line
sed -i ':a;N;$!ba;s/"\n */" /g' uc-new.xml
echo diff
diff -c unicode.xml uc-new.xml