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

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


The following commit(s) were added to refs/heads/master by this push:
     new fb4cdb3  KYLIN-4626 add set kylin home shell
fb4cdb3 is described below

commit fb4cdb32828a6508dcb8fd2cd953762dbd8a7e02
Author: chuxiao <chux...@didichuxing.com>
AuthorDate: Thu Jul 9 07:58:04 2020 +0800

    KYLIN-4626 add set kylin home shell
---
 build/bin/header.sh                  | 1 +
 build/bin/kylin-port-replace-util.sh | 1 +
 build/bin/set-kylin-home.sh          | 4 ++++
 3 files changed, 6 insertions(+)

diff --git a/build/bin/header.sh b/build/bin/header.sh
index 9f3d7a8..c725853 100755
--- a/build/bin/header.sh
+++ b/build/bin/header.sh
@@ -19,6 +19,7 @@
 
 # source me
 
+source $(cd -P -- "$(dirname -- "$0")" && pwd -P)/set-kylin-home.sh $@
 verbose=${verbose:-""}
 
 while getopts ":v" opt; do
diff --git a/build/bin/kylin-port-replace-util.sh 
b/build/bin/kylin-port-replace-util.sh
index 28a53db..03f1a34 100755
--- a/build/bin/kylin-port-replace-util.sh
+++ b/build/bin/kylin-port-replace-util.sh
@@ -20,6 +20,7 @@
 #exit if find error
 # ============================================================================
 
+source $(cd -P -- "$(dirname -- "$0")" && pwd -P)/set-kylin-home.sh $@
 set -o pipefail  # trace ERR through pipes
 set -o errtrace  # trace ERR through 'time command' and other functions
 function error() {
diff --git a/build/bin/set-kylin-home.sh b/build/bin/set-kylin-home.sh
new file mode 100644
index 0000000..d228bcb
--- /dev/null
+++ b/build/bin/set-kylin-home.sh
@@ -0,0 +1,4 @@
+if [ -z $KYLIN_HOME ];
+then
+    export KYLIN_HOME=`cd -P -- "$(dirname -- "$0")" && dirname $(pwd)`
+fi

Reply via email to