Skip to content

Instantly share code, notes, and snippets.

@antoni
Created April 13, 2017 11:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save antoni/0271421464b870a3c9de1c331b35577f to your computer and use it in GitHub Desktop.
Save antoni/0271421464b870a3c9de1c331b35577f to your computer and use it in GitHub Desktop.
A script for installing Google Cloud SDK on Ubuntu.Debian
#!/usr/bin/bash
# Create an environment variable for the correct distribution
export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)"
# Add the Cloud SDK distribution URI as a package source
echo "deb https://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
# Import the Google Cloud Platform public key
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
# Update the package list and install the Cloud SDK
sudo apt-get update && sudo apt-get install google-cloud-sdk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment