Skip to content

Commit

Permalink
Source google cloud sdk path and completion files
Browse files Browse the repository at this point in the history
We are now installing google-cloud-sdk and Deis with Homebrew using
brew bundle.
  • Loading branch information
javierjulio committed May 23, 2017
1 parent b7f62d6 commit 9bd70c3
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions dotfiles/profile.d/google
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash -e

source_google_cloud_sdk_file() {
local filename=$1
local path="/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk"
if [ -f "$path/$filename" ]; then
# shellcheck disable=SC1090
source "$path/$filename"
fi
}

# Updates PATH for the Google Cloud SDK.
source_google_cloud_sdk_file "path.bash.inc"

# Enables shell command completion for gcloud.
source_google_cloud_sdk_file "completion.bash.inc"

unset -f source_google_cloud_sdk_file

0 comments on commit 9bd70c3

Please sign in to comment.