Skip to content

Commit 08540df

Browse files
author
Bob Dill
committed
update C13 install-bx-cli.sh script to better support OSX
1 parent 35a9b42 commit 08540df

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

Chapter13/install-bx-cli.sh

+6-12
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,8 @@
44

55
function install_CLI ()
66
{
7-
showStep "installing cloud Foundry CLI"
8-
wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add -
9-
echo "deb https://packages.cloudfoundry.org/debian stable main" | sudo tee /etc/apt/sources.list.d/cloudfoundry-cli.list
10-
sudo apt-get update
11-
sudo apt-get install cf-cli
12-
13-
showStep "Installing BM Cloud (Bluemix) CLI"
14-
curl -fsSL https://clis.ng.bluemix.net/install/linux | sh
7+
showStep "installing Ubuntu or OSX cloud Foundry CLI"
8+
curl -sL http://ibm.biz/idt-installer | bash
159

1610
showStep "Getting list of uninstalled IBM Cloud CLI Packages"
1711
PACKAGE_LIST=($(bluemix plugin repo-plugins -r Bluemix | grep "Not Installed" | awk '{print $3}'))
@@ -26,12 +20,12 @@ function install_CLI ()
2620

2721
function install_kubectl
2822
{
29-
showstep "Retrieving Ubuntu or OSX kubectl"
30-
if [[ $OS == "Darwin" ]]; then
31-
echo "updating for OSX"
23+
showStep "Retrieving Ubuntu or OSX kubectl"
24+
if [[ $OS == "Darwin" ]] || [[ $OS == "darwin" ]]; then
25+
echo "updating kubectl for OSX"
3226
curl -LO https://storage.googleapis.com/kubernetes-release/release/`curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt`/bin/darwin/amd64/kubectl
3327
else
34-
echo "updating for Linux"
28+
echo "updating kubectl for Linux"
3529
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl
3630
fi
3731

0 commit comments

Comments
 (0)