-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
executable file
·48 lines (40 loc) · 886 Bytes
/
init.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
#!/bin/bash
# vim
if [ ! -e ~/.vim ]; then
ln -s ~/dotfiles/vim ~/.vim
fi
if [ ! -e ~/.vimrc ]; then
ln -s ~/dotfiles/vimrc ~/.vimrc
fi
if [ ! -e ~/.gvimrc ]; then
ln -s ~/dotfiles/gvimrc ~/.gvimrc
fi
# git
if [ ! -e ~/.gitconfig ]; then
ln -s ~/dotfiles/gitconfig ~/.gitconfig
fi
if [ ! -e ~/.gitignore_global ]; then
ln -s ~/dotfiles/gitignore_global ~/.gitignore_global
fi
# tmux
if [ ! -e ~/.tmux.conf ]; then
ln -s ~/dotfiles/tmux.conf ~/.tmux.conf
fi
# gemrc
if [ ! -e ~/.gemrc ]; then
ln -s ~/dotfiles/gemrc ~/.gemrc
fi
# ackrc
if [ ! -e ~/.ackrc ]; then
ln -s ~/dotfiles/ackrc ~/.ackrc
fi
# bashrc
bashgrep=$(grep "source ~/dotfiles/bashrc" ~/.bashrc)
if [ "$bashgrep" != "source ~/dotfiles/bashrc" ]; then
echo "source ~/dotfiles/bashrc" >> ~/.bashrc
fi
# Submodules
git submodule init
git submodule update
mkdir -p ~/.vim/tmp
mkdir -p ~/.vim/backup