From a101428259975f6d82648a1613ae56a1d7ae2a65 Mon Sep 17 00:00:00 2001 From: Emor-nj Date: Wed, 17 Jan 2024 17:41:19 +0800 Subject: [PATCH] Remove unnecessary exports. --- bin/beeline | 2 +- bin/docker-image-tool.sh | 2 +- bin/kyuubi | 2 +- bin/kyuubi-admin | 2 +- bin/kyuubi-ctl | 2 +- bin/kyuubi-zk-cli | 2 +- bin/load-kyuubi-env.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/beeline b/bin/beeline index a66354a3c80..f277efa440f 100755 --- a/bin/beeline +++ b/bin/beeline @@ -20,7 +20,7 @@ CLASS="org.apache.hive.beeline.KyuubiBeeLine" if [ -z "${KYUUBI_HOME}" ]; then - export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" + KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" fi . "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s diff --git a/bin/docker-image-tool.sh b/bin/docker-image-tool.sh index 188d79e4f56..14d5fe7b09d 100755 --- a/bin/docker-image-tool.sh +++ b/bin/docker-image-tool.sh @@ -25,7 +25,7 @@ function error { } if [ -z "${KYUUBI_HOME}" ]; then - export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" + KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" fi KYUUBI_IMAGE_NAME="kyuubi" diff --git a/bin/kyuubi b/bin/kyuubi index d5f568a943e..17ab717e5ee 100755 --- a/bin/kyuubi +++ b/bin/kyuubi @@ -63,7 +63,7 @@ function kyuubi_rotate_log() { } if [ -z "${KYUUBI_HOME}" ]; then - export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" + KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" fi if [[ $1 == "start" ]] || [[ $1 == "run" ]]; then diff --git a/bin/kyuubi-admin b/bin/kyuubi-admin index d47c0fb3a3b..8a148d159f7 100755 --- a/bin/kyuubi-admin +++ b/bin/kyuubi-admin @@ -20,7 +20,7 @@ CLASS="org.apache.kyuubi.ctl.cli.AdminControlCli" if [ -z "${KYUUBI_HOME}" ]; then - export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" + KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" fi . "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s diff --git a/bin/kyuubi-ctl b/bin/kyuubi-ctl index 33b0c6f43f7..0214737d46a 100755 --- a/bin/kyuubi-ctl +++ b/bin/kyuubi-ctl @@ -20,7 +20,7 @@ CLASS="org.apache.kyuubi.ctl.cli.ControlCli" if [ -z "${KYUUBI_HOME}" ]; then - export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" + KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" fi . "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s diff --git a/bin/kyuubi-zk-cli b/bin/kyuubi-zk-cli index 94102d4aba1..c85f47c4c5d 100755 --- a/bin/kyuubi-zk-cli +++ b/bin/kyuubi-zk-cli @@ -20,7 +20,7 @@ CLASS="org.apache.kyuubi.shaded.zookeeper.ZooKeeperMain" if [ -z "${KYUUBI_HOME}" ]; then - export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" + KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" fi . "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s diff --git a/bin/load-kyuubi-env.sh b/bin/load-kyuubi-env.sh index f44bcfed731..04fd66f8370 100755 --- a/bin/load-kyuubi-env.sh +++ b/bin/load-kyuubi-env.sh @@ -18,7 +18,7 @@ if [ -z "${KYUUBI_HOME}" ]; then - export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)" + export ${KYUUBI_HOME:-"$(cd "$(dirname "$0")"/.. || exit; pwd)"} fi export KYUUBI_CONF_DIR="${KYUUBI_CONF_DIR:-"${KYUUBI_HOME}"/conf}"