-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·171 lines (151 loc) · 3.63 KB
/
install.sh
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
#!/usr/bin/env bash
set -e -ou pipefail
PACKAGES=(
asdf
awscli
base64
bat
cookiecutter
coreutils
curl
diff-so-fancy
fzf
git
go
go-task
golangci-lint
gnu-getopt
gnu-sed
gnu-tar
grep
gzip
helm
jq
kind
kubectx
kubernetes-cli
libffi
libpq
libyaml
macvim
openssl
readline
telnet
tig
unzip
vault
yq
zlib
zsh
zsh-autosuggestions
)
CASKS=(
1password
1password-cli
docker
firefox
gpg-suite
intel-power-gadget
kitty
obsidian
sizeup
slack
snowflake-snowsql
spotify
stats
visual-studio-code
zoom
)
VSCODE_EXTENTIONS=(
bierner.markdown-mermaid
CircleCI.circleci
dorzey.vscode-sqlfluff
eamodio.gitlens
golang.go
hashicorp.terraform
innoverio.vscode-dbt-power-user
monokai.theme-monokai-pro-vscode
ms-python.isort
ms-python.python
ms-python.vscode-pylance
njpwerner.autodocstring
)
function install_prereqs () {
echo "Installing prereqs"
# xcode tools needed for homebrew
xcode-select --install
# homebrew, used for everything else
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "Done installing prereqs"
}
function install_packages () {
echo "Installing homebrew packages..."
brew update && brew install "${PACKAGES[@]}"
/usr/local/opt/fzf/install --key-bindings --completion --no-update-rc
echo "Done install homebrew packages."
echo "Installing VS Code Extentions..."
for ext in ${VSCODE_EXTENTIONS[@]}; do
code --force --install-extension "$ext"
done
echo "Done installing VS Code Extentions"
echo "Install asdf plugins..."
. $(brew --prefix)/opt/asdf/libexec/asdf.sh
asdf plugin add python
asdf plugin add terraform
echo "Done installing asdf plugins."
}
function install_applications () {
echo "Installing homebrew applications..."
brew tap homebrew/cask-drivers \
&& brew update \
&& brew install --cask "${CASKS[@]}"
echo "Done installing homebrew applications."
}
function setup_shell () {
echo "Setting up powerline-go ..."
go install github.com/justjanne/powerline-go@latest
git clone https://github.com/powerline/fonts.git --depth=1 "$HOME/fonts"
"$HOME/fonts/install.sh"
rm -r "$HOME/fonts"
echo "Done setting up powerline-go."
}
function setup_python () {
echo "Setting up poetry ..."
curl -sSL https://install.python-poetry.org | python -
echo "Done setting up poetry."
}
function setup_dotfiles () {
# setup homedir dotfiles
git clone https://github.com/ianlofs/dotfiles.git "$HOME/.dotfiles"
for i in "$HOME/.dotfiles/_*"; do
source="${HOME}/.dotfiles/$i"
target="${HOME}/${i/_/.}"
# everything else gets symlinked into home dir
if [ -e "${target}" ] && [ -h "${target}" ]; then
backup="${HOME}/.save.${i}"
echo "${target} already exists. Moving to ${backup}"
mv "${target}" "${backup}"
fi
ln -s "$source" "$target"
done
# kitty terminal conf
ln -s "${HOME}/.dotfiles/kitty.conf" "$HOME/.config/kitty/kitty.conf"
# vs code editor conf
ln -s "$HOME/.dotfiles/vscode_settings.json" "$HOME/Library/Application Support/Code/User/settings.json"
}
function setup_dirs () {
mkdir "$HOME/.bin"
mkdir "$HOME/circleci"
mkdir "$HOME/personal"
}
function main () {
install_prereqs
install_packages
install_applications
setup_shell
setup_python
setup_dirs
setup_dotfiles
setup_prodtools
}
main