-
Notifications
You must be signed in to change notification settings - Fork 2
/
setup_dotfiles
executable file
·48 lines (33 loc) · 1.43 KB
/
setup_dotfiles
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
#!/bin/bash
echo ". ~/bin/dotfiles/bashrc" > ~/.bashrc
echo ". ~/bin/dotfiles/bashrc" > ~/.bash_profile
function replace_file() {
rm -rf $1
ln -s $2 $1
}
replace_file ~/.gitconfig ~/bin/dotfiles/gitconfig
replace_file ~/.gitignore ~/bin/dotfiles/gitignore
replace_file ~/.gitattributes ~/bin/dotfiles/gitattributes
replace_file ~/.ssh/config ~/bin/dotfiles/ssh/config
replace_file ~/.gemrc ~/bin/dotfiles/gemrc
replace_file ~/.irbrc ~/bin/dotfiles/irbrc
replace_file ~/.vimrc ~/bin/dotfiles/vimrc
replace_file ~/.ackrc ~/bin/dotfiles/ackrc
replace_file ~/.inputrc ~/bin/dotfiles/inputrc
replace_file ~/.jshintrc ~/bin/dotfiles/jshintrc
replace_file ~/.ideavimrc ~/bin/dotfiles/ideavimrc
replace_file ~/.editorconfig ~/bin/dotfiles/editorconfig
replace_file ~/.editrc ~/bin/dotfiles/editrc
replace_file ~/.eslintignore ~/bin/dotfiles/eslintignore
replace_file ~/.pythonrc ~/bin/dotfiles/pythonrc
mkdir -p .vim/tmp
mkdir -p .vim/backup
replace_file ~/.vim/spell ~/bin/dotfiles/vim/spell
replace_file ~/.tmux.conf ~/bin/dotfiles/tmux.conf
replace_file $BREW_HOME/etc/nginx/nginx.conf ~/bin/dotfiles/nginx/nginx.conf
replace_file $BREW_HOME/etc/nginx/sites-available ~/bin/dotfiles/nginx/sites-available
# replace_file ~/.rvm/gemsets/global.gems ~/bin/dotfiles/rvm/global.gems
replace_file ~/.psqlrc ~/bin/dotfiles/psqlrc
mkdir -p ~/.lein
replace_file ~/.lein/profiles.clj ~/bin/dotfiles/lein/profiles.clj
echo "source ~/.bashrc # to reload environment"