From 14775c4057b3f7e930338f08f9af25f5d36a5612 Mon Sep 17 00:00:00 2001 From: SataQiu Date: Fri, 19 Apr 2019 22:19:41 +0800 Subject: [PATCH] fix shellcheck failures of hack/grab-profiles.sh --- hack/.shellcheck_failures | 1 - hack/grab-profiles.sh | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/hack/.shellcheck_failures b/hack/.shellcheck_failures index 3802b45be93..14a58294a54 100644 --- a/hack/.shellcheck_failures +++ b/hack/.shellcheck_failures @@ -26,7 +26,6 @@ ./cluster/validate-cluster.sh ./hack/cherry_pick_pull.sh ./hack/ginkgo-e2e.sh -./hack/grab-profiles.sh ./hack/lib/init.sh ./hack/lib/swagger.sh ./hack/lib/test.sh diff --git a/hack/grab-profiles.sh b/hack/grab-profiles.sh index e9b4b09f536..b0a9bc08904 100755 --- a/hack/grab-profiles.sh +++ b/hack/grab-profiles.sh @@ -47,7 +47,7 @@ function grab_profiles_from_component { done } -KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. +KUBE_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. source "${KUBE_ROOT}/hack/lib/init.sh" server_addr="" @@ -65,7 +65,7 @@ output_dir="." tunnel_port="${tunnel_port:-1234}" args=$(getopt -o s:mho:k:c -l server:,master,heapster,output:,kubelet:,scheduler,controller-manager,help,inuse-space,inuse-objects,alloc-space,alloc-objects,cpu,kubelet-binary:,master-binary:,scheduler-binary:,controller-manager-binary:,scheduler-port:,controller-manager-port: -- "$@") -if [[ $? -ne 0 ]]; then +if [[ $? ]]; then >&2 echo "Error in getopt" exit 1 fi