-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
51 lines (39 loc) · 1.39 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
#!/usr/bin/env bash
# Cd on Home directory
cd ~
# Dotfiles
DOTFILES='.aliases .bashrc .ctags .curlrc .editorconfig .gitconfig .gitignore .hyper.js .inputrc .tmux.conf .tmux.conf.local .vimrc .wgetrc .zshrc'
DOTDIR='.vim/ .config/nvim/ .tmux/ .hyper_plugins/ .oh-my-zsh/'
# Create backup directory
echo 'Starting backup dotfiles process...'
mkdir -p ~/.dotfiles-backup
# Backup current dotfiles
echo 'Moving current dotfiles into ~/.dotfiles-backup directory...'
mv $DOTFILES $DOTDIR ~/.dotfiles-backup/ 2>/dev/null
# Backup done!
echo 'Backup done!'
# Start installing new dotfiles
echo 'Starting install new dotfiles'
# Clone source code from GitHub
git clone https://github.com/NguyenTrungTin/dotfiles ~/.dotfiles
# Let's install new dotfiles
cd ~/.dotfiles
cp -r $DOTFILES $DOTDIR ~/ 2>/dev/null
source $DOTFILES
cd ~
# Setup for VIM
mkdir -p ~/.vim/backups
mkdir -p ~/.vim/swaps
mkdir -p ~/.vim/undos
mkdir -p ~/.vim/snippets
cp -r ~/.dotfiles/.vim/snippets/* ~/.vim/snippets/
cp -r ~/.dotfiles/.config/nvim/* ~/.config/nvim/
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim +PlugInstall +qall
python3 ~/.vim/plugged/YouCompleteMe/install.py --go-completer --ts-completer
# Setup for Tmux
git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
tmux source ~/.tmux.conf
# Done!
echo 'Install dotfiles successfully. Done!'