From b83b83f8e383f4279866e6afaf8598e8991f3d60 Mon Sep 17 00:00:00 2001 From: xichengliudui <1693291525@qq.com> Date: Mon, 18 Feb 2019 17:50:55 -0500 Subject: [PATCH] aaa --- cluster/kube-up.sh | 3 ++- cluster/kube-util.sh | 5 ++--- cluster/kubectl.sh | 2 +- hack/.shellcheck_failures | 3 --- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/cluster/kube-up.sh b/cluster/kube-up.sh index af85df0a838..857fe8e4479 100755 --- a/cluster/kube-up.sh +++ b/cluster/kube-up.sh @@ -24,7 +24,7 @@ set -o errexit set -o nounset set -o pipefail -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. if [ -f "${KUBE_ROOT}/cluster/env.sh" ]; then source "${KUBE_ROOT}/cluster/env.sh" @@ -84,6 +84,7 @@ elif [[ "${validate_result}" == "2" ]]; then fi if [[ "${ENABLE_PROXY:-}" == "true" ]]; then + # shellcheck disable=SC1091 . /tmp/kube-proxy-env echo "" echo "*** Please run the following to add the kube-apiserver endpoint to your proxy white-list ***" diff --git a/cluster/kube-util.sh b/cluster/kube-util.sh index 8c2ebe2c24b..b33b4ae9f16 100755 --- a/cluster/kube-util.sh +++ b/cluster/kube-util.sh @@ -18,7 +18,7 @@ # cluster/${KUBERNETES_PROVIDER}/util.sh where KUBERNETES_PROVIDER, if unset, # will use its default value (gce). -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${KUBE_ROOT}/cluster/skeleton/util.sh" @@ -34,9 +34,8 @@ fi # this is a list of the _names_ of the variables, not the value of the # variables. Providers can add variables to be appended to kube-env. # (see `build-kube-env`). -PROVIDER_VARS="" PROVIDER_UTILS="${KUBE_ROOT}/cluster/${KUBERNETES_PROVIDER}/util.sh" -if [ -f ${PROVIDER_UTILS} ]; then +if [ -f "${PROVIDER_UTILS}" ]; then source "${PROVIDER_UTILS}" fi diff --git a/cluster/kubectl.sh b/cluster/kubectl.sh index 4c03b6bfe00..3b2ce3b30e5 100755 --- a/cluster/kubectl.sh +++ b/cluster/kubectl.sh @@ -30,7 +30,7 @@ set -o pipefail # echo "-=-=-=-=-=-=-=-=-=-=" -KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE}")/..} +KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE[0]}")/..} source "${KUBE_ROOT}/cluster/kube-util.sh" source "${KUBE_ROOT}/cluster/clientbin.sh" diff --git a/hack/.shellcheck_failures b/hack/.shellcheck_failures index c3c767f27ae..82d9be506d4 100644 --- a/hack/.shellcheck_failures +++ b/hack/.shellcheck_failures @@ -21,9 +21,6 @@ ./cluster/images/conformance/run_e2e.sh ./cluster/juju/prereqs/ubuntu-juju.sh ./cluster/juju/util.sh -./cluster/kube-up.sh -./cluster/kube-util.sh -./cluster/kubectl.sh ./cluster/kubemark/gce/config-default.sh ./cluster/kubemark/iks/config-default.sh ./cluster/kubemark/util.sh