-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·68 lines (52 loc) · 1.47 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
#!/usr/bin/env bash
### Prep
if [[ "$(uname)" != "Linux"* ]]; then
echo "Unsupported system: $(uname)"
exit 1
fi
### Install utils
UTILS=(direnv fzf tig tmux)
for i in "${UTILS[@]}"
do
if ! command -v $i &> /dev/null; then
echo "--> Installing $i"
sudo apt-get install -y $i -o DPkg::Lock::Timeout=600
fi
done
# neovim
if ! command -v nvim &> /dev/null; then
echo "--> Installing neovim"
sudo apt-get install -y neovim -o DPkg::Lock::Timeout=600
fi
# ripgrep
if ! command -v rg &> /dev/null; then
echo "--> Installing ripgrep"
sudo apt-get install -y ripgrep -o DPkg::Lock::Timeout=600
fi
# fd
if ! command -v fdfind &> /dev/null; then
echo "--> Installing fdfind"
sudo apt-get install -y fd-find -o DPkg::Lock::Timeout=600
sudo ln -svf /usr/bin/fdfind /usr/bin/fd
fi
# diff-so-fancy
if ! command -v diff-so-fancy &> /dev/null; then
echo "--> Installing diff-so-fancy"
sudo add-apt-repository -y ppa:aos1/diff-so-fancy
sudo apt-get update -o DPkg::Lock::Timeout=600
sudo apt-get install -y diff-so-fancy -o DPkg::Lock::Timeout=600
fi
### Apply dotfiles
# chezmoi
sh -c "$(curl -fsLS chezmoi.io/get)" -- init ifyouseewendy --branch=chezmoi --one-shot
### Post hooks
# neovim
ln -svf ~/.vimrc ~/.config/nvim/init.vim
# vim-plug
nvim --headless +PlugInstall +qa
# coc: Ruby LSP
sudo gem install sorbet sorbet-runtime solargraph
cp ~/dotfiles/coc-settings.json ~/.config/nvim/coc-settings.json
# tpm
$HOME/.tmux/plugins/tpm/bin/install_plugins
echo "succeed"