openstack-manuals/tools/test.sh
Doug Hellmann 32a20ae990 make the test script smarter about its output directory
If we ran "tox -e publishdocs" locally, there won't be a
publish-docs/www/ directory and we don't want to create one when the
template test script is run. Have it check the existing directories to
derive where it should write its output.

Change-Id: I4ee8495bc0fb8c6a59424332d498956ea7e7e870
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-18 18:19:51 -04:00

18 lines
456 B
Bash
Executable File

#!/bin/bash -xe
if [[ -d publish-docs/www/ ]]; then
output=publish-docs/www
else
output=publish-docs/
fi
.tox/checkbuild/bin/python tools/www-generator.py --verbose --source-directory www/ \
--output-directory $output $@
if [[ $? -eq 0 ]]; then
rsync -a www/static/ $output
fi
# publish-docs/www-index.html is the trigger for openstack-indexpage
# to include the file.
#mv publish-docs/www/www-index.html publish-docs/www-index.html