-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·49 lines (37 loc) · 1.29 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
#!/bin/bash
BASEDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ -e ~/.bashrc ]];then
mv ~/.bashrc ~/.bashrc.bak
fi
ln -sf ${BASEDIR}/bashrc ~/.bashrc
if [[ -e ~/.tmux.conf ]];then
mv ~/.tmux.conf ~/.tmux.conf.bak
fi
ln -sf ${BASEDIR}/tmux.conf ~/.tmux.conf
if [[ -e ~/.ripgreprc ]];then
mv ~/.ripgreprc ~/.ripgreprc.bak
fi
ln -sf ${BASEDIR}/ripgreprc ~/.ripgreprc
if [[ -e ~/.vim ]];then
mv ~/.vim ~/.vim.bak
fi
ln -sf ${BASEDIR}/vim ~/.vim
if [[ -e ~/.vimrc ]];then
mv ~/.vimrc ~/.vimrc.bak
fi
ln -sf ${BASEDIR}/vim/vimrc ~/.vimrc
if [[ -e ~/.zshrc ]];then
mv ~/.zshrc ~/.zshrc.bak
fi
ln -sf ${BASEDIR}/zshrc ~/.zshrc
if [[ -e ~/.watchman-processor.config.js ]];then
mv ~/.watchman-processor.config.js ~/.watchman-processor.config.js.bak
fi
# handle zsh plugins & themes
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/sindresorhus/pure.git "$HOME/.zsh/pure"
ln -sf ${BASEDIR}/watchman-processor.config.js ~/.watchman-processor.config.js
#Add the gitignore settings dotfile to the local gitconfigs:
git config --global core.excludesfile ${BASEDIR}/gitignore_global
#Add the git aliases to the local gitconfigs:
git config --global include.path ${BASEDIR}/gitconfig