Files
dotfiles/scripts/install/31-gcloud.sh
2021-04-09 22:04:33 +01:00

16 lines
595 B
Bash
Executable File

#!/usr/bin/env bash
if not_installed "gcloud"; then
echo "Installing gcloud..."
# Add the Cloud SDK distribution URI as a package source
echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk 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 --keyring /usr/share/keyrings/cloud.google.gpg add -
update
install google-cloud-sdk
refresh
fi
gcloud --version