-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.sh
115 lines (94 loc) · 2.41 KB
/
bootstrap.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#!/bin/bash
cd $(dirname "$0")
link() {
if [ ! -h $HOME/.$1 ]; then
ln -s "`pwd`/dotfiles/$1" "$HOME/.$1"
fi
}
link2fdr() {
if [ ! -h $HOME/.$2/$1 ]; then
mkdir -p "$HOME/.$2"
ln -s "`pwd`/dotfiles/$1" "$HOME/.$2/$1"
fi
}
echo "init vim ...."
if [ ! -d dotfiles/vim/bundle/vundle ]; then
git clone https://github.com/gmarik/vundle.git dotfiles/vim/bundle/vundle
fi
sudo apt-get install exuberant-ctags
link vim
link vimrc
vim +BundleInstall +qall
echo "init emacs ...."
link emacs.d
# echo "git submodule update --init for jedi-vim"
# JEDI="dotfiles/vim/bundle/jedi-vim"
# if [ ! -d $JEDI ]; then
# git --git-dir=$JEDI submodule update --init
# fi
echo "init pypy config"
link pydistutils.cfg
link2fdr pip.conf pip
echo "init git ..."
IGN="$HOME/.templates.gitignore"
if [ ! -d $IGN ]; then
git clone https://github.com/github/gitignore.git $IGN
fi
#link gitignore
cat "$IGN/Global/Archives.gitignore" \
"$IGN/Global/CVS.gitignore" \
"$IGN/Global/Emacs.gitignore" \
"$IGN/Global/Linux.gitignore" \
"$IGN/Global/Mercurial.gitignore" \
"$IGN/Global/Tags.gitignore" \
"$IGN/Global/vim.gitignore" \
"$IGN/Autotools.gitignore" \
dotfiles/gitignore \
> "$HOME/.gitignore"
link gitattributes
link gitconfig
echo "init hg ..."
link hgrc
#link hg-prompt.py
echo "init zsh ..."
link zshrc
echo "init xmodmap ..."
link Xmodmap
echo "init bash_aliases ..."
link bash_aliases
echo "init python env ..."
if which easy_install > /dev/null; then
echo "easy_install has already installed"
else
apt-get install python-setuptools
fi
if which pip > /dev/null; then
echo "pip has already installed"
else
sudo apt-get install python-pip python-dev build-essential
sudo pip install --upgrade pip
sudo pip install --upgrade virtualenv
fi
if which virtualenv > /dev/null; then
echo "virtualenv has already installed"
else
sudo pip install virtualenv
fi
if [ ! -d ~/.oh-my-zsh ]; then
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
fi
link tmux.conf
if which tmux > /dev/null; then
echo "tmux has already installed"
else
sudo apt-get install tmux
fi
if which zsh > /dev/null; then
echo "zsh has already installed"
else
echo "install zsh"
sudo apt-get install zsh
fi
if ! echo $SHELL | grep -q zsh; then
echo 'You need: chsh -s `which zsh`'
fi