CTR: Handle new directories properly in `publish-docs.sh`.
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/ffe0b1f5 Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/ffe0b1f5 Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/ffe0b1f5 Branch: refs/heads/TINKERPOP-1458 Commit: ffe0b1f55af41e649961374e14b251d795286bed Parents: 9ba6806 Author: Daniel Kuppitz <[email protected]> Authored: Tue Oct 4 19:49:41 2016 +0200 Committer: Daniel Kuppitz <[email protected]> Committed: Tue Oct 4 19:49:41 2016 +0200 ---------------------------------------------------------------------- bin/publish-docs.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/ffe0b1f5/bin/publish-docs.sh ---------------------------------------------------------------------- diff --git a/bin/publish-docs.sh b/bin/publish-docs.sh index 49ed9bd..739deb5 100755 --- a/bin/publish-docs.sh +++ b/bin/publish-docs.sh @@ -53,15 +53,23 @@ diff -rq -I 'Generated by javadoc' -I '^<meta name="date"' javadocs/${VERSION}/ # copy new / modified files for file in $(cat ../publish-docs.docs | awk '/^[AU]/ {print $2}' | grep -v '.graffle$') do - cp "../docs/htmlsingle/${file}" "docs/${VERSION}/${file}" + if [ -d "../docs/htmlsingle/${file}" ]; then + mkdir -p "docs/${VERSION}/${file}" && cp -r "../docs/htmlsingle/${file}"/* "$_" + else + mkdir -p "docs/${VERSION}/`dirname ${file}`" && cp "../docs/htmlsingle/${file}" "$_" + fi done for file in $(cat ../publish-docs.javadocs | awk '/^[AU]/ {print $2}') do - cp "../site/apidocs/${file}" "javadocs/${VERSION}/${file}" + if [ -d "../site/apidocs/${file}" ]; then + mkdir -p "javadocs/${VERSION}/${file}" && cp -r "../site/apidocs/${file}"/* "$_" + else + mkdir -p "javadocs/${VERSION}/`dirname ${file}`" && cp "../site/apidocs/${file}" "$_" + fi done -pushd "docs/${VERSION}/"; cat ../../../publish-docs.docs | awk '/^A/ {print $2}' | grep -v '.graffle$' | xargs --no-run-if-empty svn add; popd -pushd "javadocs/${VERSION}/"; cat ../../../publish-docs.javadocs | awk '/^A/ {print $2}' | xargs --no-run-if-empty svn add; popd +pushd "docs/${VERSION}/"; cat ../../../publish-docs.docs | awk '/^A/ {print $2}' | grep -v '.graffle$' | xargs --no-run-if-empty svn add --parents; popd +pushd "javadocs/${VERSION}/"; cat ../../../publish-docs.javadocs | awk '/^A/ {print $2}' | xargs --no-run-if-empty svn add --parents; popd # delete old files pushd "docs/${VERSION}/"; cat ../../../publish-docs.docs | awk '/^D/ {print $2}' | xargs --no-run-if-empty svn delete; popd
