aboutsummaryrefslogtreecommitdiffstats
path: root/common_move_in.sh
blob: 90e1c95ee194a9874a2326a46f296c6fbd97a1e3 (plain) (blame)
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
#!/bin/bash

if ! [ -d "$HOME/.oh-my-zsh" ]; then
    echo "Installing Oh My ZSH"
    curl -L http://install.ohmyz.sh | sh

    # Remove the default config in favor of our own later on in this script
    rm $HOME/.zshrc
fi

if ! [ -d "$HOME/Code" ]; then
    mkdir $HOME/Code
fi

cd ~/Code

if ! [ -d "$HOME/Code/dotfiles" ]; then
    git clone git@codesaloon.com:jason/dotfiles.git
    cd dotfiles
else
    cd dotfiles
    git pull
fi
CWD=`pwd`

if ! [ -e "$HOME/.vimrc" ]; then
    echo "Linking vim settings..."
    ln -s $CWD/vim $HOME/.vim
    ln -s $CWD/vim/vimrc $HOME/.vimrc
fi

if ! [ -e "$HOME/.zshrc" ]; then
    echo "Linking .zshrc..."
    ln -s $CWD/zshrc $HOME/.zshrc
fi

# OS X Only setup
if [[ $OSTYPE == darwin* ]]; then
    if ! [ -e "$HOME/.amethyst" ]; then
        echo "Linking amethyst config..."
        ln -s $CWD/amethyst $HOME/.amethyst
    fi

    if [ -e "/usr/bin/vagrant" ] && [ -e "$CWD/../vagrant-vmware-license.lic" ]; then
        echo "Installing Vagrant support for VMWare Fusion..."
        vagrant plugin install vagrant-vmware-fusion
        vagrant plugin license vagrant-vmware-fusion "$CWD/../vagrant-vmware-license.lic"
    fi
fi

echo "Done."