From 48906e6295f2470c0c726fda2649cccb73fc1900 Mon Sep 17 00:00:00 2001 From: Joe Beda Date: Fri, 7 Oct 2016 12:25:09 -0700 Subject: [PATCH] Check for rsync and give friendlier message --- build/common.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/build/common.sh b/build/common.sh index b3d40d13f7b..a452f844d51 100755 --- a/build/common.sh +++ b/build/common.sh @@ -147,6 +147,7 @@ kube::build::get_docker_wrapped_binaries() { function kube::build::verify_prereqs() { kube::log::status "Verifying Prerequisites...." kube::build::ensure_tar || return 1 + kube::build::ensure_rsync || return 1 kube::build::ensure_docker_in_path || return 1 if kube::build::is_osx; then kube::build::docker_available_on_osx || return 1 @@ -235,6 +236,13 @@ function kube::build::is_gnu_sed() { [[ $(sed --version 2>&1) == *GNU* ]] } +function kube::build::ensure_rsync() { + if [[ -z "$(which rsync)" ]]; then + kube::log::error "Can't find 'rsync' in PATH, please fix and retry." + return 1 + fi +} + function kube::build::update_dockerfile() { if kube::build::is_gnu_sed; then sed_opts=(-i)