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 2015/06/27 01:18:51 UTC

incubator-tinkerpop git commit: attempt to make process-docs.sh work on OSX again; talking to the bash like talking to baby

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master d1c71c2b3 -> 413fe982e


attempt to make process-docs.sh work on OSX again; talking to the bash like talking to baby


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

Branch: refs/heads/master
Commit: 413fe982e1cb2b05e7af9f113920adc5d99fb5ac
Parents: d1c71c2
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Sat Jun 27 01:18:33 2015 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Sat Jun 27 01:18:33 2015 +0200

----------------------------------------------------------------------
 bin/gephi.mock      | 12 +++++++++++-
 bin/process-docs.sh | 13 +++++++++++--
 2 files changed, 22 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/413fe982/bin/gephi.mock
----------------------------------------------------------------------
diff --git a/bin/gephi.mock b/bin/gephi.mock
index 45a3753..981eed8 100755
--- a/bin/gephi.mock
+++ b/bin/gephi.mock
@@ -18,7 +18,17 @@
 # under the License.
 #
 
+PID=
+
+function cleanup {
+  [ ${PID} ] && kill ${PID}
+}
+
+trap cleanup EXIT
+
 while true
 do
-  echo -e "HTTP/1.1 200 OK\nConnection: close\n\n{}" | nc -l 8080
+  echo -e "HTTP/1.1 200 OK\nConnection: close\n\n{}" | nc -l 8080 &
+  PID=$!
+  wait ${PID}
 done

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/413fe982/bin/process-docs.sh
----------------------------------------------------------------------
diff --git a/bin/process-docs.sh b/bin/process-docs.sh
index c3d3b4f..220683d 100755
--- a/bin/process-docs.sh
+++ b/bin/process-docs.sh
@@ -19,7 +19,16 @@
 #
 
 pushd "$(dirname $0)/.." > /dev/null
-nc -z localhost 8080 || bin/gephi.mock > /dev/null 2>&1 &
+
+if [ ! `nc -z localhost 8080` ]; then
+  bin/gephi.mock > /dev/null 2>&1 &
+  GEPHI_MOCK=$!
+fi
+
 docs/preprocessor/preprocess.sh && mvn process-resources -Dasciidoc && docs/postprocessor/postprocess.sh
-pgrep gephi.mock | xargs -I {} pstree {} -p -a -l | cut -d , -f2 | awk '{print $1}' | xargs -r kill -PIPE > /dev/null
+
+if [ "${GEPHI_MOCK}" ]; then
+  kill ${GEPHI_MOCK}
+fi
+
 popd > /dev/null