You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hugegraph.apache.org by zh...@apache.org on 2022/11/20 13:38:27 UTC

[incubator-hugegraph] branch fix_start_shell created (now b3bff4c76)

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

zhaocong pushed a change to branch fix_start_shell
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git


      at b3bff4c76 Fix start shell

This branch includes the following new commits:

     new b3bff4c76 Fix start shell

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-hugegraph] 01/01: Fix start shell

Posted by zh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zhaocong pushed a commit to branch fix_start_shell
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph.git

commit b3bff4c76a49e523a5ee940744b4c1a0d9d2e431
Author: coderzc <zh...@apache.org>
AuthorDate: Sun Nov 20 21:38:07 2022 +0800

    Fix start shell
---
 hugegraph-dist/src/assembly/static/bin/hugegraph | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/hugegraph-dist/src/assembly/static/bin/hugegraph b/hugegraph-dist/src/assembly/static/bin/hugegraph
index cc566c306..f75da2c04 100644
--- a/hugegraph-dist/src/assembly/static/bin/hugegraph
+++ b/hugegraph-dist/src/assembly/static/bin/hugegraph
@@ -37,10 +37,19 @@
 ### END INIT INFO
 
 # Variables
-INSTALL_DIR=
 SERVER_PORT=
 
-BIN_DIR=$INSTALL_DIR/bin
+function abs_path() {
+    SOURCE="${BASH_SOURCE[0]}"
+    while [ -h "$SOURCE" ]; do
+        DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+        SOURCE="$(readlink "$SOURCE")"
+        [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
+    done
+    echo "$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+}
+
+BIN=`abs_path`
 SERVER_URL="http://localhost:${SERVER_PORT}"
 DETECT_URL="$SERVER_URL/versions"