aboutsummaryrefslogtreecommitdiff
path: root/deploy.sh
blob: 1f220ca84ac16ef120a29c46c95eadd2c309fb31 (plain)
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
#!/bin/bash

set -e

# check for dependencies
echo "Checking for dependencies"
echo " oh-my-zsh..."
if [ ! -e ~/.oh-my-zsh/lib ]; then
    echo "  not found!"
    exit 1
fi
if [ ! -e ~/.oh-my-zsh/themes ]; then
    echo "  not found!"
    exit 1
fi

# template git profile
echo "enter your global git user name:"
read name
echo "enter your global git e-mail:"
read email

sed -e "s|#NAME#|$name|" -e "s|#EMAIL#|$email|" gitconfig.template > gitconfig

# deploy
for f in vimrc gitconfig gitignore mostrc zshrc
do
    cp $f ~/.${f}
done

cp oh-my-zsh/svn.zsh ~/.oh-my-zsh/lib/svn.zsh
cp oh-my-zsh/xcolour.zsh-theme ~/.oh-my-zsh/themes/xcolour.zsh-theme

mkdir -p ~/.vim
cp -r vim/* ~/.vim

# clean-up
rm gitconfig