-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·159 lines (135 loc) · 3.46 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
#!/bin/bash
function print_checking() {
echo -e "\033[0;31m...checking for $1"
}
function print_installing() {
echo -e "\033[0;33m...installing $1"
}
function print_installed() {
echo -e "\033[0;32m... $1 installed"
}
function set_brew_path() {
BREW_PATH=$(brew --prefix)
}
print_checking "brew"
set_brew_path
if ! command -v brew &> /dev/null
then
print_installing "brew"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
set_brew_path
/bin/bash -c "echo 'eval \"$($BREW_PATH/bin/brew shellenv)\"' >> ~/.profile"
/bin/bash -c "$($BREW_PATH/bin/brew shellenv)"
else
set_brew_path
fi
print_installed "brew"
# print_installing "powerline fonts"
# git clone https://github.com/powerline/fonts.git
# cd fonts
# ./install.sh
# cd .. && rm -rf fonts
# print_installed "powerline fonts"
print_installing "applications from brew"
brew tap homebrew/cask-fonts
brew tap yoheimuta/protolint
brew install \
# shell tools
kitty neovim coreutils tree bat starship \
# navigation
autojump fzf fd ripgrep \
# display
font-hack-nerd-font \
# node
yarn \
# protocol buffers
protolint protobuf@3 \
# terraform
tfenv \
# docker
docker hadolint \
# ruby
chruby-fish ruby-install \
# kubernetes
krew \
# lua
luarocks \
#perl
plenv perl-build
print_installed "applications from brew"
print_checking "pynvim"
if command -v pip3
then
print_installing "pynvim"
pip3 install pynvim
fi
if command -v pip2
then
print_installing "pynvim"
pip2 install pynvim
fi
print_installed "pynvim"
print_installing "python formatting"
PIP_REQUIRE_VIRTUALENV="0" python -m pip install --upgrade ruff
print_intalled "pyton formatting"
print_installing "dotfiles"
mkdir -p ~/.config
ln -sFfn ~/.dotfiles/config/nvim/ ~/.config/nvim
ln -sFfn ~/.dotfiles/config/kitty/ ~/.config/kitty
ln -sFfn ~/.dotfiles/config/pip/ ~/.config/pip
ln -sFfn ~/.dotfiles/rgignore ~/.rgignore
ln -sFfn ~/.dotfiles/bash_profile ~/.bash_profile
ln -sFfn ~/.dotfiles/bashrc ~/.bashrc
ln -sFfn ~/.dotfiles/gitconfig ~/.gitconfig
ln -sFfn ~/.dotfiles/gitignore ~/.gitignore
ln -sFfn ~/.dotfiles/tmux.conf ~/.tmux.conf
ln -sFfn ~/.dotfiles/scripts/templatemux /usr/local/bin/templatemux
print_installed "dotfiles"
# Install NVM
print_checking "nvm"
if ! command -v nvm &> /dev/null
d
then
print_installing "nvm"
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash
fi
print_installed "nvm"
# Install G
print_checking "g"
if ! command -v g &> /dev/null
then
print_installing "g"
curl -sSL https://git.io/g-install | sh -s
source ~/.bash_profile
g install latest
g set latest
# Install bufls for lsp
go install github.com/bufbuild/buf-language-server/cmd/bufls@latest
fi
print_installed "g"
print_installing "go dependencies"
go install github.com/a-h/templ/cmd/templ@latest
print_installed "go dependencies"
print_installing "nvim plugins"
nvim --headless "+Lazy! sync" +qa
print_installed "nvim plugins"
print_installing "node2"
./install-node2.sh
print_installed "node2"
print_installing "fish"
./install-fish.sh
print_installed "fish"
print_checking "rust"
if ! command -v rustup &> /dev/null
then
print_installing "rust"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
fi
print_installed "rust"
print_checking "bun"
if ! command -v bun &> /dev/null
then
print_installing "bun"
curl -fsSL https://bun.sh/install | bash
fi
print_installed "bun"