You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2016/04/20 20:37:31 UTC

incubator-tinkerpop git commit: For dry runs and full runs accept only full paths to asciidoc files (abs. or rel.) or directories containing asciidoc files.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1020 af75d55c2 -> e2cbc6991


For dry runs and full runs accept only full paths to asciidoc files (abs. or rel.) or directories containing asciidoc files.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/e2cbc699
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/e2cbc699
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/e2cbc699

Branch: refs/heads/TINKERPOP-1020
Commit: e2cbc699149a4e64d8f045797f009d6bb2d00e88
Parents: af75d55
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Wed Apr 20 20:35:17 2016 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Wed Apr 20 20:35:17 2016 +0200

----------------------------------------------------------------------
 bin/process-docs.sh                  | 16 ++++++++++++++--
 docs/preprocessor/preprocess-file.sh |  2 +-
 docs/preprocessor/preprocess.sh      |  2 +-
 3 files changed, 16 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2cbc699/bin/process-docs.sh
----------------------------------------------------------------------
diff --git a/bin/process-docs.sh b/bin/process-docs.sh
index 0b0e1eb..eb779a9 100755
--- a/bin/process-docs.sh
+++ b/bin/process-docs.sh
@@ -26,6 +26,18 @@ DRYRUN=
 DRYRUN_DOCS=
 FULLRUN_DOCS=
 
+makeAbsPaths () {
+  for doc in $(tr ',' $'\n' <<< "$1"); do
+    if [ -d $doc ]; then
+      for d in $(find "$doc" -name "*.asciidoc"); do
+        echo $(cd $(dirname "$d") && pwd -P)/$(basename "$d")
+      done
+    else
+      echo $(cd $(dirname "$doc") && pwd -P)/$(basename "$doc")
+    fi
+  done | paste -sd ',' -
+}
+
 while [[ $# -gt 0 ]]
 do
   key="$1"
@@ -38,7 +50,7 @@ do
       DRYRUN=1
       shift
       if [[ $# -gt 0 ]] && [[ $1 != -* ]]; then
-        DRYRUN_DOCS="$1"
+        DRYRUN_DOCS=$(makeAbsPaths "$1")
         shift
       else
         DRYRUN_DOCS="*"
@@ -48,7 +60,7 @@ do
       DRYRUN=1
       DRYRUN_DOCS=${DRYRUN_DOCS:-"*"}
       shift
-      FULLRUN_DOCS="$1"
+      FULLRUN_DOCS=$(makeAbsPaths "$1")
       shift
       ;;
     *)

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2cbc699/docs/preprocessor/preprocess-file.sh
----------------------------------------------------------------------
diff --git a/docs/preprocessor/preprocess-file.sh b/docs/preprocessor/preprocess-file.sh
index 4159b4e..78622d6 100755
--- a/docs/preprocessor/preprocess-file.sh
+++ b/docs/preprocessor/preprocess-file.sh
@@ -56,7 +56,7 @@ input=$4
 output=`sed 's@/docs/src/@/target/postprocess-asciidoc/@' <<< "${input}"`
 
 SKIP=
-if dryRun `basename ${input} .asciidoc`; then
+if dryRun ${input}; then
   SKIP=1
 fi
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/e2cbc699/docs/preprocessor/preprocess.sh
----------------------------------------------------------------------
diff --git a/docs/preprocessor/preprocess.sh b/docs/preprocessor/preprocess.sh
index a3b6172..1c496f6 100755
--- a/docs/preprocessor/preprocess.sh
+++ b/docs/preprocessor/preprocess.sh
@@ -24,7 +24,7 @@ FULLRUN_DOCS="$2"
 
 pushd "$(dirname $0)/../.." > /dev/null
 
-if [ "${DRYRUN_DOCS}" != "" ]; then
+if [ "${DRYRUN_DOCS}" != "*" ]; then
 
   if [ ! -f bin/gremlin.sh ]; then
     echo "Gremlin REPL is not available. Cannot preprocess AsciiDoc files."