Skip to content

Commit

Permalink
update C13 install-bx-cli.sh script to better support OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
Bob Dill committed Jul 24, 2018
1 parent 35a9b42 commit 08540df
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions Chapter13/install-bx-cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}'))
Expand All @@ -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

Expand Down

0 comments on commit 08540df

Please sign in to comment.