-
Notifications
You must be signed in to change notification settings - Fork 2
/
install_basic.sh
executable file
·49 lines (38 loc) · 1.24 KB
/
install_basic.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
# link config files
ln -sf $PWD/vimrc ~/.vimrc
ln -sf $PWD/ideavimrc ~/.ideavimrc
ln -sf $PWD/tmux.conf ~/.tmux.conf
ln -sf $PWD/bashrc_extra ~/.bashrc_extra
ln -sf $PWD/gitignore_global ~/.gitignore_global
mkdir -p ~/.vim/syntax/
ln -sf $PWD/coffee.vim ~/.vim/syntax/coffee.vim
mkdir -p ~/.vim/indent/
ln -sf $PWD/coffee.indent.vim ~/.vim/indent/coffee.vim
mkdir -p ~/.vim/colors/
ln -sf $PWD/colors/summerfruit256.vim ~/.vim/colors/summerfruit256.vim
# source .bashrc_extra from .bashrc
touch ~/.bashrc
cat ~/.bashrc | grep -v 'bashrc_extra' > /tmp/bashrc
echo source ~/.bashrc_extra >> /tmp/bashrc
mv /tmp/bashrc ~/.bashrc
source ~/.bashrc
# install scripts into the bin
mkdir -p ~/bin
# install config files into etc
mkdir -p ~/etc
# install vim plugins
if [ ! -d ~/.vim/bundle/vundle ]
then
mkdir -p ~/.vim/bundle
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
# install git completion
if [ ! -f ~/.git-completion.bash ]
then
curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash > ~/.git-completion.bash
fi
# set git defaults
git config --global core.editor vim
git config --global core.excludesfile ~/.gitignore_global
git config --global push.default current