forked from kennon/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup
executable file
·70 lines (61 loc) · 1.59 KB
/
setup
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
#/bin/sh
echo "Setting up zsh config..."
if [ -f ~/.zshrc ]; then
echo "~/.zshrc already exists, skipping"
else
ln -sf ~/dotfiles/zshrc ~/.zshrc
fi
touch ~/.zshrc.local
echo "Setting up tmux config..."
if [ -f ~/.tmux.conf ]; then
echo "~/.tmux.conf already exists, skipping"
else
ln -sf ~/dotfiles/tmux.conf ~/.tmux.conf
fi
touch ~/.tmux.conf.local
# check to see if the ack command exists
command -v ack >/dev/null 2>&1
if [ $? -eq 1 ];
then
echo "Ack is not installed, vim ack support will not be available."
echo "Install with: sudo apt-get install ack-grep OR brew install ack"
fi
echo "Setting up vim config..."
mkdir -p ~/.vim/backup
if [ ! -d ~/.vim/bundle/Vundle.vim ]; then
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
fi
if [ -f ~/.vimrc ]; then
echo "~/.vimrc already exists, skipping"
else
ln -sf ~/dotfiles/vimrc ~/.vimrc
fi
touch ~/.vimrc.local
vim +PluginUpdate +qall
echo "Setting up bash config..."
if [ -f ~/.bash_aliases ]; then
echo "~/.bash_aliases already exists, skipping"
else
ln -sf ~/dotfiles/bash_aliases ~/.bash_aliases
fi
source ~/.bash_aliases
touch ~/.bash_aliases.local
echo "Setting up git config..."
if [ -f ~/.gitconfig ]; then
echo "~/.gitconfig already exists, skipping"
else
ln -sf ~/dotfiles/gitconfig ~/.gitconfig
fi
touch ~/.gitconfig.local
echo "Setting up Rake tasks..."
if [ -f ~/Rakefile ]; then
echo "~/Rakefile already exists, skipping"
else
ln -sf ~/dotfiles/Rakefile ~/Rakefile
fi
if [ -f ~/tasks ]; then
echo "~/tasks already exists, skipping"
else
ln -sf ~/dotfiles/tasks ~/
fi
mkdir -p ~/tasks.local