-
Notifications
You must be signed in to change notification settings - Fork 2
/
makehtml_kr.sh
32 lines (24 loc) · 1.01 KB
/
makehtml_kr.sh
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
#!/bin/bash
CURR_PATH=$PWD
TVM_PATH=$CURR_PATH/desk
TVMDOC_BUILD_PATH=$TVM_PATH/docs
export TVM_HOME=$TVM_PATH
export PYTHONPATH=$TVM_HOME/python
export TVM_TUTORIAL_EXEC_PATTERN=none
cd $TVMDOC_BUILD_PATH
git checkout -- $TVMDOC_BUILD_PATH/conf.py
sed -i "s/language = None/language = \"kr\"\nlocale_dirs = [\"locale\"]\ngettext_compact = False\ntls_verify = False/" $TVMDOC_BUILD_PATH/conf.py
sed -i "s/\"find_mayavi_figures\": False,//" $TVMDOC_BUILD_PATH/conf.py
# workaround against an error on compiling v0.8 nn.rst
sed -i "s/tvm.relay.nn/tvm.relay.op.nn/" $TVMDOC_BUILD_PATH/reference/api/python/relay/nn.rst
echo "Generating HTML artifacts in Korean..."
make -e SPHINXOPS="-D language='kr'" html
git checkout -- $TVMDOC_BUILD_PATH/conf.py
git checkout -- $TVMDOC_BUILD_PATH/reference/api/python/relay/nn.rst
echo "Dumping HTML artifacts to docs for github pages hosting..."
if [ ! -d $CURR_PATH/docs ]; then
mkdir $CURR_PATH/docs
fi
cp -rf $TVMDOC_BUILD_PATH/_build/html/* $CURR_PATH/docs
cd $CURR_PATH
echo "Done!"