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/08 19:40:27 UTC

incubator-tinkerpop git commit: use stdbuf only if it's available

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master 5c516402b -> 3be49881d


use stdbuf only if it's available


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

Branch: refs/heads/master
Commit: 3be49881d4a9d52956597ea9f322d9fd64b453c5
Parents: 5c51640
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Mon Jun 8 19:39:51 2015 +0200
Committer: Daniel Kuppitz <da...@hotmail.com>
Committed: Mon Jun 8 19:39:51 2015 +0200

----------------------------------------------------------------------
 docs/preprocessor/preprocess-file.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/3be49881/docs/preprocessor/preprocess-file.sh
----------------------------------------------------------------------
diff --git a/docs/preprocessor/preprocess-file.sh b/docs/preprocessor/preprocess-file.sh
index 012c448..2251093 100755
--- a/docs/preprocessor/preprocess-file.sh
+++ b/docs/preprocessor/preprocess-file.sh
@@ -27,6 +27,12 @@ input=$2
 name=`basename ${input}`
 output="${TP_HOME}/target/postprocess-asciidoc/${name}"
 
+if hash stdbuf 2> /dev/null; then
+  lb="stdbuf -oL"
+else
+  lb=""
+fi
+
 trap cleanup INT
 
 function cleanup() {
@@ -53,9 +59,9 @@ if [ $(grep -c '^\[gremlin' ${input}) -gt 0 ]; then
   awk -f ${AWK_SCRIPTS}/prepare.awk ${input} |
   awk -f ${AWK_SCRIPTS}/init-code-blocks.awk |
   awk -f ${AWK_SCRIPTS}/progressbar.awk -v tpl=${AWK_SCRIPTS}/progressbar.groovy.template | HADOOP_GREMLIN_LIBS="${CONSOLE_HOME}/ext/hadoop-gremlin/lib" bin/gremlin.sh |
-  stdbuf -oL awk -f ${AWK_SCRIPTS}/ignore.awk   |
-  stdbuf -oL awk -f ${AWK_SCRIPTS}/prettify.awk |
-  stdbuf -oL awk -f ${AWK_SCRIPTS}/cleanup.awk  > ${output}
+  ${lb} awk -f ${AWK_SCRIPTS}/ignore.awk   |
+  ${lb} awk -f ${AWK_SCRIPTS}/prettify.awk |
+  ${lb} awk -f ${AWK_SCRIPTS}/cleanup.awk  > ${output}
 
   ps=(${PIPESTATUS[@]})
   for i in {0..6}; do