forked from strycore/dotfiles-fork
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·62 lines (56 loc) · 1.58 KB
/
install.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
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/usr/bin/env bash
function link_file {
source="${PWD}/$1"
target="${HOME}/.${1}"
if [ -e "${target}" ]
then
if [ "_$(readlink ${target})" == "_${source}" ]
then
echo "[SKIP] Existing target ${target}, skipping file $1"
return
else
backup=$target.backup$(date +%s)
echo "[BCKP] Saving backup of exising file ${target} as ${backup}"
mv $target $backup
fi
fi
echo "[ OK ] Creating link to ${source}"
ln -sf ${source} ${target}
}
link_file vim
link_file vimrc
link_file profile
link_file bashrc
link_file zshrc
link_file screenrc
link_file pylintrc
link_file gitconfig
link_file gitignore_global
link_file hgrc
link_file ackrc
link_file tmux.conf
link_file tmux.django.conf
if [ ! -e "$HOME/.oh-my-zsh" ]
then
echo "[INST] Installing oh-my-zsh"
curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh
mkdir -p ~/.oh-my-zsh/custom/plugins
else
echo "[SKIP] oh-my-zsh is already installed"
fi
if [ -e "~/.oh-my-zsh/custom/plugins/grunt" ]
then
mkdir -p ~/.oh-my-zsh/custom/plugins
cd ~/.oh-my-zsh/custom/plugins
git clone https://github.com/yonchu/grunt-zsh-completion.git grunt
fi
if [ -e "~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting" ]
then
mkdir -p ~/.oh-my-zsh/custom/plugins
cd ~/.oh-my-zsh/custom/plugins
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
fi
mkdir -p ~/.config/terminator
if [ ! -e ~/.config/terminator/config ]; then
ln -s $(pwd)/terminator/config ~/.config/terminator/config
fi