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 2019/12/05 19:56:25 UTC

[tinkerpop] 01/03: CTR: Replaced `ifconfig` with `ip`.

This is an automated email from the ASF dual-hosted git repository.

dkuppitz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 2ca82c8be34e0083e03f91a83fea831c01c7b1c0
Author: Daniel Kuppitz <da...@hotmail.com>
AuthorDate: Thu Dec 5 12:55:15 2019 -0700

    CTR: Replaced `ifconfig` with `ip`.
---
 docker/scripts/build.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docker/scripts/build.sh b/docker/scripts/build.sh
index fe5e9c3..15e5cce 100755
--- a/docker/scripts/build.sh
+++ b/docker/scripts/build.sh
@@ -107,7 +107,7 @@ if [ ! -z "${BUILD_USER_DOCS}" ]; then
   ln -s .. target/docs/htmlsingle/docs/${VERSION}
 
   # start a simple HTTP server
-  IP=$(ifconfig | grep -o 'inet addr:[0-9.]*' | cut -f2 -d ':' | head -n1)
+  IP=$(ip -4 address show | grep -Pv '\blo\b' | grep -o 'inet [0-9.]*' | cut -f2 -d ' ' | head -n1)
   cd target/docs/htmlsingle/
   if [ -z "${BUILD_JAVA_DOCS}" ]; then
     echo -e "\nUser Docs can be viewed under http://${IP}/\n"
@@ -122,9 +122,9 @@ if [ ! -z "${BUILD_USER_DOCS}" ]; then
 
 elif [ ! -z "${BUILD_JAVA_DOCS}" ]; then
 
-  IP=$(ifconfig | grep -o 'inet addr:[0-9.]*' | cut -f2 -d ':' | head -n1)
+  IP=$(ip -4 address show | grep -Pv '\blo\b' | grep -o 'inet [0-9.]*' | cut -f2 -d ' ' | head -n1)
   echo -e "\nJava Docs can be viewed under http://${IP}/\n"
-  cd target/docs/htmlsingle/
+  cd target/site/apidocs/full/
   python -m SimpleHTTPServer 80
 
 fi