diff --git a/install.sh b/install.sh index b75e27a..e415129 100755 --- a/install.sh +++ b/install.sh @@ -340,6 +340,15 @@ function install_binaries(){ popd || log error "pushd fail" fi + if [[ ! -f "$BIN_DIR"/kp ]]; then + pushd "$TMP_DIR" || log error "pushd fail" + log debug "installing kp" + wget -q https://github.com/vmware-tanzu/kpack-cli/releases/download/v0.4.2/kp-linux-0.4.2 + mv kp-linux-0.4.2 "$BIN_DIR"/kp + chmod 755 "$BIN_DIR"/kp + popd || log error "pushd fail" + fi + } function install_packages(){ diff --git a/tests/test_install.bats b/tests/test_install.bats index f09a66a..a54d020 100755 --- a/tests/test_install.bats +++ b/tests/test_install.bats @@ -158,4 +158,8 @@ load '/opt/bats-assert/load.bash' @test "kubetail.bash should exist in bin dir" { assert [ -e "$HOME/.k8s-dotfiles/bin/kubetail.bash" ] +} + +@test "kubetail should exist in bin dir and be executable" { + assert [ -x "$HOME/.k8s-dotfiles/bin/kp" ] } \ No newline at end of file