From 08540df31f4599881832973bcafaceab3eefe22e Mon Sep 17 00:00:00 2001 From: Bob Dill Date: Tue, 24 Jul 2018 19:57:30 -0400 Subject: [PATCH] update C13 install-bx-cli.sh script to better support OSX --- Chapter13/install-bx-cli.sh | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/Chapter13/install-bx-cli.sh b/Chapter13/install-bx-cli.sh index c846f74..956839f 100755 --- a/Chapter13/install-bx-cli.sh +++ b/Chapter13/install-bx-cli.sh @@ -4,14 +4,8 @@ function install_CLI () { - showStep "installing cloud Foundry CLI" - wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - - echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list - sudo apt-get update - sudo apt-get install cf-cli - - showStep "Installing BM Cloud (Bluemix) CLI" - curl -fsSL https://clis.ng.bluemix.net/install/linux | sh + showStep "installing Ubuntu or OSX cloud Foundry CLI" + curl -sL http://ibm.biz/idt-installer | bash showStep "Getting list of uninstalled IBM Cloud CLI Packages" PACKAGE_LIST=($(bluemix plugin repo-plugins -r Bluemix | grep "Not Installed" | awk '{print $3}')) @@ -26,12 +20,12 @@ function install_CLI () function install_kubectl { - showstep "Retrieving Ubuntu or OSX kubectl" - if [[ $OS == "Darwin" ]]; then - echo "updating for OSX" + showStep "Retrieving Ubuntu or OSX kubectl" + if [[ $OS == "Darwin" ]] || [[ $OS == "darwin" ]]; then + echo "updating kubectl for OSX" curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/darwin/amd64/kubectl else - echo "updating for Linux" + echo "updating kubectl for Linux" curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl fi