-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathinstall.sh
executable file
·50 lines (36 loc) · 1.16 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
#!/bin/bash
# make sure directory path is ok when script is started from anywhere
MYDIR="$(dirname -- "$0")"
# .vimrc install
cp $MYDIR/vimrc ~/.vimrc
# .vim install
rm -rf ~/.vim || true
cp -r $MYDIR/vim ~/.vim
# install coc.nvim
cd ~/.vim/bundle/coc.nvim && yarn install
cd $MYDIR
mkdir -p ~/.config
# nvim install
rm -rf ~/.config/nvim || true
cp -r $MYDIR/nvim ~/.config/nvim
# alacritty install (sensible for mac only)
if [[ $(uname) == "Darwin" ]]; then
cp -r $MYDIR/alacritty ~/.config/alacritty
fi
# .bash_aliases install
cp $MYDIR/bash_aliases ~/.bash_aliases
# scripts install
mkdir -p ~/scripts
cp -r $MYDIR/scripts/* ~/scripts/*
# apply bash aliases for zsh as well
echo "[ -f ~/.bash_aliases ] && source ~/.bash_aliases" >> ~/.zshrc
# tmux conf install
cp $MYDIR/tmux.conf ~/.tmux.conf
cp -r $MYDIR/gitmux.conf ~/.gitmux.conf
# setup default eslint config
cp $MYDIR/eslintrc.yaml ~/.eslintrc.yaml
# Install coc extensions
vim -c 'CocInstall -sync coc-json coc-html coc-css coc-tsserver coc-prettier coc-go coc-styled-components coc-graphql coc-sql' +qall
vim -c 'GoInstallBinaries' +qall
vim -c 'TSInstall typescript' +qall
echo "dotfiles finished installing!"