aboutsummaryrefslogtreecommitdiff
path: root/install.sh
blob: 1929eb8c74a71615db33e1325e3bf509a3de7e53 (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
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh

###########################
# dotfiles install script #
###########################

# dotfiles directory
[ -z $DOTDIR ] && DOTDIR=`pwd`

# Creating links
ln -sf $DOTDIR/.zshrc $HOME/.zshrc
ln -sf $DOTDIR/.vimrc $HOME/.vimrc
[ ! -d $HOME/.vim/plugin ] && mkdir -p $HOME/.vim/plugin
ln -sf $DOTDIR/grep.vim $HOME/.vim/plugin/grep.vim

[ ! -d $HOME/.xmonad ] && mkdir $HOME/.xmonad
ln -sf $DOTDIR/xmonad.hs $HOME/.xmonad/xmonad.hs

ln -sf $DOTDIR/.gdbinit $HOME/.gdbinit
ln -sf $DOTDIR/.ghci $HOME/.ghci
ln -sf $DOTDIR/.gitconfig $HOME/.gitconfig

[ ! -d $HOME/.config ] && mkdir $HOME/.config
ln -sf $DOTDIR/redshift.conf $HOME/.config/redshift.conf

################
# dependencies #
################

# vim Plug
PLUGFILE=$HOME/.vim/autoload/plug.vim
if [ ! -f $PLUGFILE ]; then
curl -fLo $PLUGFILE --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
fi
vim -c "PlugInstall" -c "qa"

# zsh pluggins
[ ! -d $HOME/.zsh ] && make $HOME/.zsh
# pure theme
[ ! -d $HOME/.zsh/pure ] && \
    git clone https://github.com/sindresorhus/pure \
    $HOME/.zsh/pure
# syntax hightlighting
[ ! -d $HOME/.zsh/zsh-syntax-highlighting ] && \
    git clone https://github.com/zsh-users/zsh-syntax-highlighting \
    $HOME/.zsh/zsh-syntax-highlighting
# you should use
[ ! -d $HOME/.zsh/zsh-you-should-use ] && \
    git clone https://github.com/MichaelAquilina/zsh-you-should-use \
    $HOME/.zsh/zsh-you-should-use