Skip to content

Commit 31903e6

Browse files
authored
Merge pull request kubernetes#76152 from SataQiu/fix-shell-cluster-20190404
Fix some shellcheck failures of cluster/*.sh
2 parents 22c67bb + bc279da commit 31903e6

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

cluster/clientbin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ set -o errexit
1818
set -o nounset
1919
set -o pipefail
2020

21-
KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE}")/..}
21+
KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE[0]}")/..}
2222

2323
# Detect the OS name/arch so that we can find our binary
2424
case "$(uname -s)" in

cluster/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ set -o errexit
2020
set -o nounset
2121
set -o pipefail
2222

23-
KUBE_ROOT=$(cd $(dirname "${BASH_SOURCE}")/.. && pwd)
23+
KUBE_ROOT=$(cd $(dirname "${BASH_SOURCE[0]}")/.. && pwd)
2424

2525
DEFAULT_KUBECONFIG="${HOME:-.}/.kube/config"
2626

cluster/log-dump/log-dump.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ readonly max_dump_processes=25
6363

6464
# TODO: Get rid of all the sourcing of bash dependencies eventually.
6565
function setup() {
66-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
66+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
6767
if [[ -z "${use_custom_instance_list}" ]]; then
6868
: ${KUBE_CONFIG_FILE:="config-test.sh"}
6969
echo "Sourcing kube-util.sh"

cluster/pre-existing/util.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# pre-existing Kubernetes master. See test/kubemark/pre-existing/README.md
1919
# for me details on using a pre-existing provider.
2020

21-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../..
21+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../..
2222

2323
source "${KUBE_ROOT}/cluster/common.sh"
2424
source "${KUBE_ROOT}/hack/lib/util.sh"

cluster/test-e2e.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ set -o errexit
2121
set -o nounset
2222
set -o pipefail
2323

24-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
24+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2525
source "${KUBE_ROOT}/cluster/kube-util.sh"
2626

2727
echo "Testing cluster with provider: ${KUBERNETES_PROVIDER}" 1>&2

cluster/test-network.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set -o errexit
2424
set -o nounset
2525
set -o pipefail
2626

27-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
27+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2828
KUBE_CONFIG_FILE="config-default.sh"
2929

3030
${KUBE_ROOT}/hack/ginkgo-e2e.sh --ginkgo.focus=Networking

cluster/test-smoke.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ set -o errexit
2323
set -o nounset
2424
set -o pipefail
2525

26-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
26+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2727

2828
TEST_ARGS="$@"
2929

cluster/validate-cluster.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ set -o errexit
2424
set -o nounset
2525
set -o pipefail
2626

27-
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
27+
KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
2828

2929
if [ -f "${KUBE_ROOT}/cluster/env.sh" ]; then
3030
source "${KUBE_ROOT}/cluster/env.sh"

0 commit comments

Comments
 (0)