github.com/tada-team/tdproto@v1.51.57/codegen/sphinx/update_sphinx.bash (about) 1 #!/bin/bash 2 set -euo pipefail 3 shopt -s extdebug 4 IFS=$'\n\t' 5 6 TDPROTO_SPHINX_DIR="$1" 7 8 if [ ! -d "$TDPROTO_SPHINX_DIR" ]; then 9 echo "Passed path is not a directory" 10 exit 1 11 fi 12 13 DOCS_DIR=$(readlink -f "$TDPROTO_SPHINX_DIR")"/docs" 14 15 if [ ! -d "$DOCS_DIR" ]; then 16 echo "docs direcroty missing" 17 exit 1 18 fi 19 20 go run ./events > "${DOCS_DIR}/events.rst" 21 go run ./json_index > "${DOCS_DIR}/data_index.rst" 22 go run ./paths_doc team > "${DOCS_DIR}/team_paths.rst" 23 go run ./paths_doc group > "${DOCS_DIR}/group_paths.rst" 24 go run ./paths_doc chat > "${DOCS_DIR}/chat_paths.rst" 25 go run ./paths_doc misc > "${DOCS_DIR}/misc_paths.rst" 26 go run ./paths_doc task > "${DOCS_DIR}/task_paths.rst"