Repository: incubator-s2graph
Updated Branches:
  refs/heads/master 339be374f -> ea734a93e


S2GRAPH-159: simplified path resolution that fixes the issue


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

Branch: refs/heads/master
Commit: 7b40c3e8ecdd61ea1a9340ff586f1f7f40f5d947
Parents: 339be37
Author: Sergio Fernández <[email protected]>
Authored: Fri Aug 11 05:15:38 2017 +0200
Committer: DO YUNG YOON <[email protected]>
Committed: Fri Aug 11 17:20:52 2017 +0900

----------------------------------------------------------------------
 bin/s2graph-env.sh | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/7b40c3e8/bin/s2graph-env.sh
----------------------------------------------------------------------
diff --git a/bin/s2graph-env.sh b/bin/s2graph-env.sh
index 0145e1d..66941b7 100644
--- a/bin/s2graph-env.sh
+++ b/bin/s2graph-env.sh
@@ -18,16 +18,8 @@
 # Should be sourced and not be directly executed.
 # The executable flag for this file should not be set, e.g. 644.
 
-# Find the current directory
-SOURCE="${BASH_SOURCE[0]}"
-# resolve $SOURCE until the file is no longer a symlink
-while [ -h "$SOURCE" ]; do
-  DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
-  SOURCE="$(readlink "$SOURCE")"
-  # if $SOURCE was a relative symlink, we need to resolve it relative to the 
path where the symlink file was located
-  [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE"
-done
-DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+# find the current directory
+DIR=$(cd "$(dirname "${BASH_SOURCE-$0}")">/dev/null; pwd)
 
 # set S2GRAPH_HOME
 if [ -z $S2GRAPH_HOME ]; then

Reply via email to