-
Notifications
You must be signed in to change notification settings - Fork 153
/
release_doc.sh
executable file
·55 lines (47 loc) · 2.17 KB
/
release_doc.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
python docs/generate_operation.py ${DIR}/build/supported_ops.rst
# generate tpu-mlir_quick_start
# ------------------------------------------------------------------------------
pushd ${DIR}/docs/quick_start
make clean
make pdf
make html
popd
# generate tpu-mlir_technical_manual
# ------------------------------------------------------------------------------
pushd ${DIR}/docs/developer_manual
make clean
make pdf
make html
popd
# ------------------------------------------------------------------------------
mkdir -p ${DIR}/build/docs/quick_start_zh
cp -rf ${DIR}/docs/quick_start/build_zh/tpu-mlir_quick_start_zh.pdf \
${DIR}/build/docs/quick_start_zh/
cp -rf ${DIR}/docs/quick_start/build_zh/html ${DIR}/build/docs/quick_start_zh
mkdir -p ${DIR}/build/docs/quick_start_en
cp -rf ${DIR}/docs/quick_start/build_en/tpu-mlir_quick_start_en.pdf \
${DIR}/build/docs/quick_start_en/
cp -rf ${DIR}/docs/quick_start/build_en/html ${DIR}/build/docs/quick_start_en
mkdir -p ${DIR}/build/docs/developer_manual_zh
cp -f ${DIR}/docs/developer_manual/build_zh/tpu-mlir_technical_manual_zh.pdf \
${DIR}/build/docs/developer_manual_zh/
cp -rf ${DIR}/docs/developer_manual/build_zh/html ${DIR}/build/docs/developer_manual_zh/
mkdir -p ${DIR}/build/docs/developer_manual_en
cp -f ${DIR}/docs/developer_manual/build_en/tpu-mlir_technical_manual_en.pdf \
${DIR}/build/docs/developer_manual_en/
cp -rf ${DIR}/docs/developer_manual/build_en/html ${DIR}/build/docs/developer_manual_en/
if [[ ! -z "$INSTALL_PATH" ]]; then
# only install pdf
mkdir -p ${INSTALL_PATH}/docs
cp -f ${DIR}/docs/quick_start/build_zh/tpu-mlir_quick_start_zh.pdf \
${INSTALL_PATH}/docs/"TPU-MLIR快速入门指南.pdf"
cp -f ${PROJECT_ROOT}/docs/quick_start/build_en/tpu-mlir_quick_start_en.pdf \
${INSTALL_PATH}/docs/"TPU-MLIR_Quick_Start.pdf"
cp -f ${PROJECT_ROOT}/docs/developer_manual/build_zh/tpu-mlir_technical_manual_zh.pdf \
${INSTALL_PATH}/docs/"TPU-MLIR开发参考手册.pdf"
cp -f ${PROJECT_ROOT}/docs/developer_manual/build_en/tpu-mlir_technical_manual_en.pdf \
${INSTALL_PATH}/docs/"TPU-MLIR_Technical_Reference_Manual.pdf"
fi