Allow overriding of openstack-manuals dir

I already have a (sizable) openstack-manuals repo cloned locally and it
would appear tox does not work in a nested repo. Provide a way to
override this option.

Change-Id: I4ef80825598cc7d98a4046afd5b131484e5a3469
This commit is contained in:
Stephen Finucane 2017-03-09 16:06:09 +00:00
parent b4492e34f9
commit 74b981092b
1 changed files with 12 additions and 2 deletions

View File

@ -28,6 +28,7 @@ MANUALS_PROJECTS="openstack-manuals"
BRANCH=master
FAST=0
QUIET=0
CLONE_MANUALS=1
usage() {
echo "Wrapper for autohelp.py"
@ -48,6 +49,8 @@ usage() {
echo " -e PATH: Create the virtualenv in PATH"
echo " -v LEVEL: Verbose message (1 or 2)"
echo " (check various python modules imported or not)"
echo " -o OUTDIR: Path to output openstack-manuals directory "
echo " (defaults to ./sources/openstack-manuals)"
}
setup_venv() {
@ -100,7 +103,7 @@ setup_tools() {
pip install -rrequirements.txt
}
while getopts :b:g:e:v:cfq opt; do
while getopts :b:g:e:o:v:cfq opt; do
case $opt in
b)
BRANCH=$OPTARG
@ -114,6 +117,11 @@ while getopts :b:g:e:v:cfq opt; do
e)
VENVDIR=$OPTARG
;;
o)
MANUALSREPO=$OPTARG
MAPPINGS_DIR=$OPTARG/tools/autogenerate-config-flagmappings
CLONE_MANUALS=0
;;
f)
FAST=1
;;
@ -165,7 +173,9 @@ fi
RELEASE=$(echo $BRANCH | sed 's,^stable.,,')
if [ "$FAST" -eq 0 ] ; then
get_project openstack-manuals
if [ "$CLONE_MANUALS" -eq 1 ] ; then
get_project openstack-manuals
fi
for project in $PROJECTS; do
setup_venv $project