diff --git a/hack/.shellcheck_failures b/hack/.shellcheck_failures index 6ba671b985..cbb262a115 100644 --- a/hack/.shellcheck_failures +++ b/hack/.shellcheck_failures @@ -45,13 +45,6 @@ ./hack/build-cross.sh ./hack/build-go.sh ./hack/cherry_pick_pull.sh -./hack/e2e-internal/e2e-cluster-size.sh -./hack/e2e-internal/e2e-down.sh -./hack/e2e-internal/e2e-grow-cluster.sh -./hack/e2e-internal/e2e-shrink-cluster.sh -./hack/e2e-internal/e2e-status.sh -./hack/e2e-internal/e2e-up.sh -./hack/e2e-node-test.sh ./hack/generate-bindata.sh ./hack/generate-docs.sh ./hack/get-build.sh diff --git a/hack/e2e-internal/e2e-cluster-size.sh b/hack/e2e-internal/e2e-cluster-size.sh index 8e604b9e37..817bd76caa 100755 --- a/hack/e2e-internal/e2e-cluster-size.sh +++ b/hack/e2e-internal/e2e-cluster-size.sh @@ -18,10 +18,10 @@ set -o errexit set -o nounset set -o pipefail -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. -: ${KUBECTL:=${KUBE_ROOT}/cluster/kubectl.sh} -: ${KUBE_CONFIG_FILE:="config-test.sh"} +: "${KUBECTL:=${KUBE_ROOT}/cluster/kubectl.sh}" +: "${KUBE_CONFIG_FILE:="config-test.sh"}" export KUBECTL KUBE_CONFIG_FILE diff --git a/hack/e2e-internal/e2e-down.sh b/hack/e2e-internal/e2e-down.sh index 87bcb9a41e..ed318b6551 100755 --- a/hack/e2e-internal/e2e-down.sh +++ b/hack/e2e-internal/e2e-down.sh @@ -18,10 +18,10 @@ set -o errexit set -o nounset set -o pipefail -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. -: ${KUBECTL:=${KUBE_ROOT}/cluster/kubectl.sh} -: ${KUBE_CONFIG_FILE:="config-test.sh"} +: "${KUBECTL:=${KUBE_ROOT}/cluster/kubectl.sh}" +: "${KUBE_CONFIG_FILE:="config-test.sh"}" export KUBECTL KUBE_CONFIG_FILE diff --git a/hack/e2e-internal/e2e-grow-cluster.sh b/hack/e2e-internal/e2e-grow-cluster.sh index 67b8603d26..65c7926e7e 100755 --- a/hack/e2e-internal/e2e-grow-cluster.sh +++ b/hack/e2e-internal/e2e-grow-cluster.sh @@ -14,18 +14,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. -if [[ ! -z "${1:-}" ]]; then +if [[ -n "${1:-}" ]]; then export KUBE_GCE_ZONE="${1}" fi -if [[ ! -z "${2:-}" ]]; then +if [[ -n "${2:-}" ]]; then export MULTIZONE="${2}" fi -if [[ ! -z "${3:-}" ]]; then +if [[ -n "${3:-}" ]]; then export KUBE_REPLICATE_EXISTING_MASTER="${3}" fi -if [[ ! -z "${4:-}" ]]; then +if [[ -n "${4:-}" ]]; then export KUBE_USE_EXISTING_MASTER="${4}" fi if [[ -z "${NUM_NODES:-}" ]]; then diff --git a/hack/e2e-internal/e2e-shrink-cluster.sh b/hack/e2e-internal/e2e-shrink-cluster.sh index 4e67b9813c..f94d57cc28 100755 --- a/hack/e2e-internal/e2e-shrink-cluster.sh +++ b/hack/e2e-internal/e2e-shrink-cluster.sh @@ -14,18 +14,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. -if [[ ! -z "${1:-}" ]]; then +if [[ -n "${1:-}" ]]; then export KUBE_GCE_ZONE="${1}" fi -if [[ ! -z "${2:-}" ]]; then +if [[ -n "${2:-}" ]]; then export MULTIZONE="${2}" fi -if [[ ! -z "${3:-}" ]]; then +if [[ -n "${3:-}" ]]; then export KUBE_DELETE_NODES="${3}" fi -if [[ ! -z "${4:-}" ]]; then +if [[ -n "${4:-}" ]]; then export KUBE_USE_EXISTING_MASTER="${4}" fi diff --git a/hack/e2e-internal/e2e-status.sh b/hack/e2e-internal/e2e-status.sh index 59a4559e9e..5e70929d76 100755 --- a/hack/e2e-internal/e2e-status.sh +++ b/hack/e2e-internal/e2e-status.sh @@ -18,10 +18,10 @@ set -o errexit set -o nounset set -o pipefail -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. -: ${KUBECTL:=${KUBE_ROOT}/cluster/kubectl.sh} -: ${KUBE_CONFIG_FILE:="config-test.sh"} +: "${KUBECTL:=${KUBE_ROOT}/cluster/kubectl.sh}" +: "${KUBE_CONFIG_FILE:="config-test.sh"}" export KUBECTL KUBE_CONFIG_FILE diff --git a/hack/e2e-internal/e2e-up.sh b/hack/e2e-internal/e2e-up.sh index 24f4f6a587..eea6b94f19 100755 --- a/hack/e2e-internal/e2e-up.sh +++ b/hack/e2e-internal/e2e-up.sh @@ -18,10 +18,10 @@ set -o errexit set -o nounset set -o pipefail -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/../.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/../.. -: ${KUBECTL:=${KUBE_ROOT}/cluster/kubectl.sh} -: ${KUBE_CONFIG_FILE:="config-test.sh"} +: "${KUBECTL:=${KUBE_ROOT}/cluster/kubectl.sh}" +: "${KUBE_CONFIG_FILE:="config-test.sh"}" export KUBECTL KUBE_CONFIG_FILE diff --git a/hack/e2e-node-test.sh b/hack/e2e-node-test.sh index 4d697602ff..4a8bf6d66d 100755 --- a/hack/e2e-node-test.sh +++ b/hack/e2e-node-test.sh @@ -20,7 +20,7 @@ set -o errexit set -o nounset set -o pipefail -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. # For help output ARGHELP="" @@ -40,4 +40,4 @@ echo "The equivalent of this invocation is: " echo " make test-e2e-node ${ARGHELP}" echo echo -make --no-print-directory -C "${KUBE_ROOT}" test-e2e-node FOCUS=${FOCUS:-} SKIP=${SKIP:-} +make --no-print-directory -C "${KUBE_ROOT}" test-e2e-node FOCUS="${FOCUS:-}" SKIP="${SKIP:-}"