2021-07-04 16:20:14 +02:00
|
|
|
#!/bin/bash
|
2021-07-04 09:02:29 +02:00
|
|
|
|
2021-07-12 13:06:18 +02:00
|
|
|
if [[ $CLOUD_SHELL != "true" ]]; then
|
|
|
|
echo "You're not inside Google Cloud Shell." && exit 1
|
|
|
|
# You need to run this ~/.customize_environment file in root, possibly using sudo.
|
|
|
|
# https://stackoverflow.com/questions/18215973/ddg#18216122
|
|
|
|
elif [[ "$EUID" -ne 0 ]]; then
|
|
|
|
echo "You're not root to initialize your Cloud Shell environment." && exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# update our cache stuff, but first add backports for Debian Buster
|
2022-02-27 16:12:17 +01:00
|
|
|
echo "===> Updating local index cache"
|
2021-07-12 13:06:18 +02:00
|
|
|
echo -e "deb http://ftp.debian.org/debian buster-backports main\ndeb-src http://ftp.debian.org/debian buster-backports main" | tee /etc/apt/sources.list.d/buster-backports.list
|
2021-07-04 09:02:29 +02:00
|
|
|
apt-get update
|
2022-02-27 16:12:17 +01:00
|
|
|
sleep 2; echo
|
2021-07-04 09:02:29 +02:00
|
|
|
|
2021-07-12 13:06:18 +02:00
|
|
|
# Install HashiCorp Vault, as usual. Don't forget to update GitHub CLI and Terraform
|
2022-02-27 16:12:17 +01:00
|
|
|
echo "===> Installing GitHub CLI, bat, Terraform and vault CLI"
|
|
|
|
apt-get install vault gh terraform bat -y
|
|
|
|
sleep 2; echo
|
2021-07-12 13:06:18 +02:00
|
|
|
|
2022-02-27 16:12:17 +01:00
|
|
|
# Install Git and Git LFS from Buster backports
|
|
|
|
echo "===> Upgrading Git and Git LFS from backports"
|
|
|
|
apt-get install -t buster-backports git git-lfs -y
|
|
|
|
sleep 2; echo
|
2021-07-04 16:20:14 +02:00
|
|
|
|
|
|
|
# https://unix.stackexchange.com/questions/12702/no-manual-page-for-regex-in-section-3-where-is-it#12705
|
2021-08-10 16:03:31 +02:00
|
|
|
#apt install manpages manpages-dev manpages-posix manpages-posix-dev -y
|
|
|
|
|
|
|
|
# btw we need code-server, because Cloud Code sucks.
|
2022-02-27 16:12:17 +01:00
|
|
|
echo "===> Installing code-server"
|
2021-08-10 16:03:31 +02:00
|
|
|
curl -fsSL https://code-server.dev/install.sh | sh
|
2022-02-27 16:12:17 +01:00
|
|
|
sleep 2; echo
|
|
|
|
|
|
|
|
# Install uuidgen magic
|
|
|
|
ech "===> Installing uuid-runtime for uuidgen"
|
|
|
|
apt-get install -yq uuid-runtime
|
|
|
|
sleep 2; echo
|
|
|
|
|
|
|
|
echo "====> Installing direnv from GitHub"
|
|
|
|
curl -sfL https://direnv.net/install.sh | bash
|
|
|
|
|
|
|
|
echo "====> Installing Dazzle and Buildkit from GitHub"
|
|
|
|
curl -sSL https://github.com/moby/buildkit/releases/download/v0.9.3/buildkit-v0.9.3.linux-amd64.tar.gz | sudo tar xvz -C /usr
|
|
|
|
curl -sSL https://github.com/gitpod-io/dazzle/releases/download/v0.1.6/dazzle_0.1.6_Linux_x86_64.tar.gz | tar -xvz -C /usr/local/bin
|
|
|
|
chmod +x /usr/local/bin/dazzle
|
|
|
|
rm /usr/local/bin/README.md /usr/local/bin/LICENSE
|
|
|
|
|
|
|
|
echo "====> Installing zsh stuf"
|
|
|
|
apt-get install -y zsh
|