mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 21:50:05 +00:00
/cluster: cleanup clientbin.sh
clientbin.sh is only used in kubectl.sh. It contains logic for finding a binary that was build from the k/k tree and for printing errors if the binary cannot be found. - Remove clientbin.sh - Remove references of clientbin.sh from /cluster/BUILD - Use hack/lib/util.sh's kube::util::find-binary for finding the binary
This commit is contained in:
@@ -32,15 +32,25 @@ set -o pipefail
|
||||
|
||||
KUBE_ROOT=${KUBE_ROOT:-$(dirname "${BASH_SOURCE[0]}")/..}
|
||||
source "${KUBE_ROOT}/cluster/kube-util.sh"
|
||||
source "${KUBE_ROOT}/cluster/clientbin.sh"
|
||||
source "${KUBE_ROOT}/hack/lib/util.sh"
|
||||
|
||||
# If KUBECTL_PATH isn't set, gather up the list of likely places and use ls
|
||||
# to find the latest one.
|
||||
if [[ -z "${KUBECTL_PATH:-}" ]]; then
|
||||
kubectl=$( get_bin "kubectl" "cmd/kubectl" )
|
||||
kubectl=$( kube::util::find-binary "kubectl" )
|
||||
|
||||
if [[ ! -x "$kubectl" ]]; then
|
||||
print_error "kubectl"
|
||||
{
|
||||
echo "It looks as if you don't have a compiled kubectl binary"
|
||||
echo
|
||||
echo "If you are running from a clone of the git repo, please run"
|
||||
echo "'./build/run.sh make cross'. Note that this requires having"
|
||||
echo "Docker installed."
|
||||
echo
|
||||
echo "If you are running from a binary release tarball, something is wrong. "
|
||||
echo "Look at http://kubernetes.io/ for information on how to contact the "
|
||||
echo "development team for help."
|
||||
} >&2
|
||||
exit 1
|
||||
fi
|
||||
elif [[ ! -x "${KUBECTL_PATH}" ]]; then
|
||||
|
Reference in New Issue
Block a user