diff options
Diffstat (limited to 'jjb/releng/docu-build-new.sh')
-rwxr-xr-x | jjb/releng/docu-build-new.sh | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/jjb/releng/docu-build-new.sh b/jjb/releng/docu-build-new.sh new file mode 100755 index 000000000..0062f8e17 --- /dev/null +++ b/jjb/releng/docu-build-new.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +clean() {{ +if [[ -d docs/output ]]; then +rm -rf docs/output +echo "cleaning up output directory" +fi +}} + +trap clean EXIT TERM INT SIGTERM SIGHUP + +directories=() +while read -d $'\n'; do + directories+=("$REPLY") +done < <(find docs/ -name 'index.rst' -printf '%h\n' | sort -u ) + +for dir in "${{directories[@]}}"; do +echo +echo "#############################" +echo "Building DOCS in ${{dir##*/}}" +echo "#############################" +echo + +if [[ ! -d docs/output/"${{dir##*/}}/" ]]; then + mkdir -p docs/output/"${{dir##*/}}/" +fi + +sphinx-build -b html -E -c docs/etc/ ""$dir"/" docs/output/"${{dir##*/}}/" + +done + |