diff --git a/docs/source/generate_luadoc.sh b/docs/source/generate_luadoc.sh index a39cff5ca6..6ee65ffaab 100755 --- a/docs/source/generate_luadoc.sh +++ b/docs/source/generate_luadoc.sh @@ -4,15 +4,18 @@ 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 -PATH=$PATH:~/lua-5.1.5/src -eval "$(luarocks path)" - -if [ ! command -v openmwluadocumentor &> /dev/null ]; then +if ! command -v openmwluadocumentor &> /dev/null +then if [ -f /.dockerenv ] || [ -f /home/docs/omw_luadoc_docker ]; then ./install_luadocumentor_in_docker.sh fi fi -if [ ! command -v openmwluadocumentor &> /dev/null ]; then + +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 fi