From 74b981092bb92dbed76fa6d6543353a80bb0919b Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Thu, 9 Mar 2017 16:06:09 +0000 Subject: [PATCH] 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 --- autogenerate_config_docs/autohelp-wrapper | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/autogenerate_config_docs/autohelp-wrapper b/autogenerate_config_docs/autohelp-wrapper index de93436..1154650 100755 --- a/autogenerate_config_docs/autohelp-wrapper +++ b/autogenerate_config_docs/autohelp-wrapper @@ -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