Skip to content

Commit

Permalink
uniformly modify all related scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Emor-nj committed Jan 17, 2024
1 parent 35215b9 commit f48db3f
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 9 deletions.
4 changes: 3 additions & 1 deletion bin/beeline
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
## Kyuubi BeeLine Entrance
CLASS="org.apache.hive.beeline.KyuubiBeeLine"

export KYUUBI_HOME="${KYUUBI_HOME:-"$(cd "$(dirname "$0")"/.. || exit; pwd)"}"
if [ -z "${KYUUBI_HOME}" ]; then
export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi

. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s

Expand Down
2 changes: 1 addition & 1 deletion bin/docker-image-tool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function error {
}

if [ -z "${KYUUBI_HOME}" ]; then
KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi
KYUUBI_IMAGE_NAME="kyuubi"

Expand Down
4 changes: 3 additions & 1 deletion bin/kyuubi
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ function kyuubi_rotate_log() {
fi
}

export KYUUBI_HOME="$(cd "$(dirname "$0")"/..; pwd)"
if [ -z "${KYUUBI_HOME}" ]; then
export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi

if [[ $1 == "start" ]] || [[ $1 == "run" ]]; then
. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh"
Expand Down
4 changes: 3 additions & 1 deletion bin/kyuubi-admin
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
## Kyuubi Admin Control Client Entrance
CLASS="org.apache.kyuubi.ctl.cli.AdminControlCli"

export KYUUBI_HOME="$(cd "$(dirname "$0")"/..; pwd)"
if [ -z "${KYUUBI_HOME}" ]; then
export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi

. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s

Expand Down
4 changes: 3 additions & 1 deletion bin/kyuubi-ctl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@
## Kyuubi Control Client Entrance
CLASS="org.apache.kyuubi.ctl.cli.ControlCli"

export KYUUBI_HOME="$(cd "$(dirname "$0")"/..; pwd)"
if [ -z "${KYUUBI_HOME}" ]; then
export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi

. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s

Expand Down
5 changes: 3 additions & 2 deletions bin/kyuubi-zk-cli
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@
## Zookeeper Shell Client Entrance
CLASS="org.apache.kyuubi.shaded.zookeeper.ZooKeeperMain"

export KYUUBI_HOME="$(cd "$(dirname "$0")"/..; pwd)"

if [ -z "${KYUUBI_HOME}" ]; then
export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi
. "${KYUUBI_HOME}/bin/load-kyuubi-env.sh" -s

if [[ -z ${JAVA_HOME} ]]; then
Expand Down
5 changes: 3 additions & 2 deletions bin/load-kyuubi-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
#


export KYUUBI_HOME="${KYUUBI_HOME:-"$(cd "$(dirname "$0")"/.. || exit; pwd)"}"

if [ -z "${KYUUBI_HOME}" ]; then
export KYUUBI_HOME="$(cd "`dirname "$0"`"/..; pwd)"
fi
export KYUUBI_CONF_DIR="${KYUUBI_CONF_DIR:-"${KYUUBI_HOME}"/conf}"

silent=0
Expand Down

0 comments on commit f48db3f

Please sign in to comment.