From 84528e67edab50eb54fa78cf05daf1fc07f77e36 Mon Sep 17 00:00:00 2001 From: Tim Savannah Date: Mon, 13 May 2019 11:43:20 -0400 Subject: [PATCH] Update mkdoc.sh script to ensure we are in project root dir and to enable nullglob --- mkdoc.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mkdoc.sh b/mkdoc.sh index acfbfc5..5b8a6da 100755 --- a/mkdoc.sh +++ b/mkdoc.sh @@ -1,9 +1,13 @@ #!/bin/bash +# Ensure we are in the project root directory +cd "$(dirname "$(realpath "${BASH_SOURCE[0]}")")" + +shopt -s nullglob ALL_MODS="$(echo func_timeout/*.py | tr ' ' '\n' | sed -e 's|/|.|g' -e 's|.py$||g' -e 's|.__init__$||g' | tr '\n' ' ')" pydoc -w ${ALL_MODS} -mv *.html doc/ +mv func_timeout*.html doc/ pushd doc >/dev/null 2>&1 rm -f index.html