-
Notifications
You must be signed in to change notification settings - Fork 3
/
setup_env.sh
executable file
·151 lines (119 loc) · 4.33 KB
/
setup_env.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
#!/bin/bash
set -e
sudo apt -y update && sudo apt -y dist-upgrade
# add-apt-repository / curl / wget / xdg-open / fuse
sudo apt -y install software-properties-common curl wget xdg-utils fuse git-lfs
# Conflicts with nodejs on debian
sudo apt remove nodejs-doc
# Vim 8.2
sudo add-apt-repository -y -r ppa:jonathonf/vim
sudo apt -y update
# Remove system vim (might need vim.tiny here)
sudo apt -y remove vim
# unzip zsh py3-pip tmux mosh vim
sudo apt -y install zsh unzip python3-pip tmux mosh vim-gtk3 gettext-base xclip
# Neovim build deps
sudo apt -y install ninja-build gettext libtool libtool-bin autoconf automake cmake g++ pkg-config doxygen
# TODO: fix this?
# TPM
if [[ -d "~/.tmux/plugins/tpm" ]]
then
echo "Skipping tpm.."
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
fi
# Yarn
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt -y update && sudo apt -y install yarn
# Znap
if [[ -d "~/zsh/znap-repos/zsh-snap" ]]
then
echo "Skipping znap.."
git clone --depth 1 https://github.com/marlonrichert/zsh-snap.git ~/zsh/znap-repos/zsh-snap
fi
mkdir -p ~/.config/nvim/lua
mkdir -p ~/.vim
mkdir -p ~/.local/bin
cd ~/.local/bin
# wsl-open
if [[ $(uname -r) =~ WSL2$ ]]; then
wget "https://gitlab.com/4U6U57/wsl-open/-/raw/develop/wsl-open.sh"
mv wsl-open.sh wsl-open
chmod +x wsl-open
fi
# jq
wget "https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64"
mv ./jq-linux64 ~/.local/bin/jq
chmod +x ~/.local/bin/jq
# ijq
wget "https://git.sr.ht/~gpanders/ijq/refs/download/v0.3.6/ijq-0.3.6-linux-x86_64.tar.gz"
tar xzvf ijq-0.3.6-linux-x86_64.tar.gz
mv ijq-0.3.6/ijq ~/.local/bin/ijq
rm ijq-0.3.6-linux-x86_64.tar.gz
rm -rf ijq-0.3.6
# EXA
wget "https://github.com/ogham/exa/releases/download/v0.10.1/exa-linux-x86_64-v0.10.1.zip"
unzip -o exa-linux-x86_64-v0.10.1.zip
mv ./bin/exa ~/.local/bin/exa
rm ./exa-linux-x86_64-v0.10.1.zip
# Should probably install man pages/completions
sudo mv ./completions/exa.zsh /usr/share/zsh/vendor-completions/_exa
sudo mv ./man/exa.1 /usr/share/man/man1/exa.1
rm -rf ./completions/
rm -rf ./man/
rm -rf ./bin/
# BAT
wget "https://github.com/sharkdp/bat/releases/download/v0.21.0/bat_0.21.0_amd64.deb"
sudo dpkg -i bat_0.21.0_amd64.deb
rm bat_0.21.0_amd64.deb
# FD
wget "https://github.com/sharkdp/fd/releases/download/v8.3.0/fd_8.3.0_amd64.deb"
sudo dpkg -i fd_8.3.0_amd64.deb
rm fd_8.3.0_amd64.deb
# RG
wget "https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb"
sudo dpkg -i ripgrep_13.0.0_amd64.deb
rm ripgrep_13.0.0_amd64.deb
# Bottom
wget "https://github.com/ClementTsang/bottom/releases/download/0.6.4/bottom_0.6.4_amd64.deb"
sudo dpkg -i bottom_0.6.4_amd64.deb
rm bottom_0.6.4_amd64.deb
# Golang
wget "https://go.dev/dl/go1.18.linux-amd64.tar.gz"
rm -rf ~/go
rm -rf /usr/local/go && tar -C $HOME -xzf go1.18.linux-amd64.tar.gz
rm go1.18.linux-amd64.tar.gz
# fast node manager
curl -fsSL https://fnm.vercel.app/install | bash --skip-shell
fnm completions --shell zsh >> /tmp/_fnm
sudo mv /tmp/_fnm /usr/share/zsh/vendor-completions/_fnm
fnm install v18.20.0
fnm default v18.20.0
# FZF
git clone --depth 1 https://github.com/junegunn/fzf.git ~/dev/fzf
~/dev/fzf/install --all
echo "Installing vim-plug for vim/nvim.."
curl -fLo ~/.vim/autoload/plug.vim --create-dirs 'https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
sudo pip3 install virtualenv virtualenvwrapper
curl -sSL https://install.python-poetry.org | python3 -
# Elixir (conflicts with rabbitmq-server for some reason)
# wget "https://packages.erlang-solutions.com/erlang-solutions_2.0_all.deb"
# sudo dpkg -i erlang-solutions_2.0_all.deb
# rm erlang-solutions_2.0_all.deb
# sudo apt update
# sudo apt install -y esl-erlang
# sudo apt install -y elixir
# RabbitMQ + Redis
# sudo apt install -y rabbitmq-server --fix-missing
# sudo apt install -y redis
# Vim from source
# Ubuntu:
# Check sources checkbox in software updates
# sudo sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list
# Debian
# deb-src http://deb.debian.org/debian buster main
# sudo apt update
# sudo apt build-dep vim-gtk
exit 0