-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·41 lines (35 loc) · 1.24 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
#!/usr/bin/env bash
cd "$(dirname "$0")"
git pull
for f in `ls -1 -ad ./.* | grep -v 'git\|bash\|exports\|prompt\|\.$'`
do
if [ -f ~/$f ]; then
mv ~/$f ~/$f.bk
echo Save ~/$f.bk
fi
ln -fs $PWD/$f ~
done
mkdir -p ~/.config/git/
touch ~/.config/git/config
git config -f ~/.config/git/config user.name `git config user.name`
git config -f ~/.config/git/config user.email `git config user.email`
if [ -f ~/.gitconfig ]; then
mv ~/.gitconfig ~/.gitconfig.bk
echo Warning: ~/.gitconfig is backed up with ~/.gitconfig.bk and replaced with a symlink to ~/$PWD/.gitconfig
echo Use diff ~/.gitconfig.bk ~/.gitconfig in order to see check changes
echo Use ~/.config/git/config for personal git settings, i.e. name or email
fi
ln -s ~/$PWD/.gitconfig ~/.gitconfig
source ~/.profile
echo Fetch/update neobundle.vim
rm -rf ~/.vim/bundle/neobundle.vim
curl https://codeload.github.com/Shougo/neobundle.vim/tar.gz/master > neobundle.tar.gz
mkdir -p .vim/bundle/
tar xf neobundle.tar.gz
mv neobundle.vim-master .vim/bundle/neobundle.vim
rm neobundle.tar.gz
echo Done
which zsh > /dev/null || exit
echo Install oh-my-zsh
curl https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh | zsh
chsh -s $(which zsh)