You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2016/10/15 07:59:02 UTC
kylin git commit: minor, enhance KYLIN_HOME setup
Repository: kylin
Updated Branches:
refs/heads/yang21 75de81b3a -> 36a404f95
minor, enhance KYLIN_HOME setup
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/36a404f9
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/36a404f9
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/36a404f9
Branch: refs/heads/yang21
Commit: 36a404f959e9677ffe17d55e6b3064b883772e9f
Parents: 75de81b
Author: Yang Li <li...@apache.org>
Authored: Sat Oct 15 15:58:48 2016 +0800
Committer: Yang Li <li...@apache.org>
Committed: Sat Oct 15 15:58:48 2016 +0800
----------------------------------------------------------------------
build/bin/kylin.sh | 7 ++++---
build/bin/metastore.sh | 9 +++++----
2 files changed, 9 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/36a404f9/build/bin/kylin.sh
----------------------------------------------------------------------
diff --git a/build/bin/kylin.sh b/build/bin/kylin.sh
index 201b5b6..244838b 100644
--- a/build/bin/kylin.sh
+++ b/build/bin/kylin.sh
@@ -17,9 +17,10 @@
# limitations under the License.
#
-# We should set KYLIN_HOME here for multiple tomcat instances that are on the same node.
-# In addition, we should set a KYLIN_HOME for the global use as normal.
-KYLIN_HOME=`dirname $0`/..
+dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
+
+# set KYLIN_HOME with consideration for multiple instances that are on the same node
+KYLIN_HOME=${KYLIN_HOME:-"${dir}/../"}
export KYLIN_HOME=`cd "$KYLIN_HOME"; pwd`
dir="$KYLIN_HOME/bin"
http://git-wip-us.apache.org/repos/asf/kylin/blob/36a404f9/build/bin/metastore.sh
----------------------------------------------------------------------
diff --git a/build/bin/metastore.sh b/build/bin/metastore.sh
index 5f34bff..baf3d7a 100755
--- a/build/bin/metastore.sh
+++ b/build/bin/metastore.sh
@@ -24,11 +24,12 @@
# take a look at SandboxMetastoreCLI
-dir=$(dirname ${0})
+dir=$(cd -P -- "$(dirname -- "$0")" && pwd -P)
-# We should set KYLIN_HOME here for multiple tomcat instsances that are on the same node.
-# In addition, we should set a KYLIN_HOME for the global use as normal.
-export KYLIN_HOME=${dir}/../
+# set KYLIN_HOME with consideration for multiple instances that are on the same node
+KYLIN_HOME=${KYLIN_HOME:-"${dir}/../"}
+export KYLIN_HOME=`cd "$KYLIN_HOME"; pwd`
+dir="$KYLIN_HOME/bin"
source ${dir}/check-env.sh