1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00
OpenMW/docs/source/generate_luadoc.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
843 B
Bash
Raw Normal View History

#!/bin/bash
DOCS_SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
FILES_DIR=$DOCS_SOURCE_DIR/../../files
OUTPUT_DIR=$DOCS_SOURCE_DIR/reference/lua-scripting/generated_html
2023-02-20 21:43:45 +00:00
if ! command -v openmwluadocumentor &> /dev/null
then
if [ -f /.dockerenv ] || [ -f /home/docs/omw_luadoc_docker ]; then
./install_luadocumentor_in_docker.sh
fi
fi
2023-02-20 21:43:45 +00:00
PATH=$PATH:~/luarocks/bin
eval "$(luarocks path)"
if ! command -v openmwluadocumentor &> /dev/null
then
echo "openmwluadocumentor not found; See README.md for installation instructions."
exit
2021-11-18 15:19:54 +00:00
fi
rm -f $OUTPUT_DIR/*.html
2023-01-26 22:31:27 +00:00
data_paths=$($DOCS_SOURCE_DIR/luadoc_data_paths.sh)
cd $FILES_DIR/lua_api
openmwluadocumentor -f doc -d $OUTPUT_DIR openmw/*lua
cd $FILES_DIR/data
2023-01-26 22:31:27 +00:00
for path in $data_paths
do
openmwluadocumentor -f doc -d $OUTPUT_DIR $path
2023-01-26 22:31:27 +00:00
done