From a86db8f53b7e28aa84002cb643890565a11400a5 Mon Sep 17 00:00:00 2001 From: Yvo Mulder <7681555+ytbmulder@users.noreply.github.com> Date: Sun, 28 Oct 2018 16:49:16 +0100 Subject: [PATCH] Install/update kubectl using Homebrew for macOS. --- linux-installer/idt-installer | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/linux-installer/idt-installer b/linux-installer/idt-installer index 68799ed..28a17a4 100755 --- a/linux-installer/idt-installer +++ b/linux-installer/idt-installer @@ -37,7 +37,7 @@ function help { 4. Defines 'idt' shortcut to improve useability. - idt : Shortcut for normal "bx dev" command - idt update : Runs this installer checking for and installing any updates - - idt uninstall : Uninstalls IDT, 'bx' cli, and all plugins + - idt uninstall : Uninstalls IDT, 'bx' cli, and all plugins Chat with us on Slack: ${SLACK_URL}, channel #developer-tools Submit any issues to : ${GIT_URL}/issues @@ -133,7 +133,7 @@ function install { else log "Starting Update..." fi - + #-- Check if internal IBM setup if [[ -n "$(which bx)" ]]; then read -r repo url <<< $(bx plugin repos | grep stage1) @@ -192,13 +192,13 @@ function install_deps { brew cask reinstall docker fi - #-- kubectl: + #-- kubectl: log "Installing/updating external dependency: kubectl" - if [[ -z "$(which kubectl)" || "$FORCE" == true ]]; then - curl --progress-bar -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl - $SUDO mv ./kubectl /usr/local/bin/kubectl - $SUDO chmod +x /usr/local/bin/kubectl + if [[ -z "$(which kubectl)" ]]; then + brew install kubectl log "Please review any setup requirements for 'kubectl' from: https://kubernetes.io/docs/tasks/tools/install-kubectl/" + elif [[ "$FORCE" == true ]]; then + brew upgrade kubectl fi #-- helm: @@ -450,4 +450,4 @@ function main { #------------------------------------------------------------------------------ #-- Kick things off #------------------------------------------------------------------------------ -main "$@" \ No newline at end of file +main "$@"