From 4b2c5ed209514534a0ead54cd3c91fc3b42d6194 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Thu, 24 Oct 2013 17:40:13 +0100 Subject: [PATCH] only clone docs from gh-pages branch if they aren't there Allow the caller of this script to decide which commit from the gh-pages branch should be used to build the docs. This also avoid excessive repeated git clones during development. Change-Id: I3e58eef0ac03b15903c06d5632c0eb41413db02c --- tools/build_docs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/build_docs.sh b/tools/build_docs.sh index 216e557025..1c145e237f 100755 --- a/tools/build_docs.sh +++ b/tools/build_docs.sh @@ -91,8 +91,9 @@ fi # Assumption is we are now in the DevStack repo workspace to be processed # Pull the latest docs branch from devstack.org repo -rm -rf docs || true -git clone -b gh-pages $GH_PAGES_REPO docs +if ! [ -d docs ]; then + git clone -b gh-pages $GH_PAGES_REPO docs +fi # Build list of scripts to process FILES=""