-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·65 lines (54 loc) · 1.54 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
63
64
65
#!/bin/sh
# Cancel everything if minimun dependencies are not met
if ! hash git 2>/dev/null; then
echo 'Git is a mandatory dependency'
exit 1
fi
if ! hash curl 2>/dev/null; then
echo 'curl is a mandatory dependency'
exit 1
fi
# Storing the current directory to go back later
pwd=$(pwd)
# Moving to home to make commands relative to here
cd $HOME
# Installing homeshick to manage dotfiles
if [ ! -e $HOME/.homesick/repos/homeshick ]; then
git clone [email protected]:andsens/homeshick $HOME/.homesick/repos/homeshick
fi
# Loading homeshick
source $HOME/.homesick/repos/homeshick/homeshick.sh
# Getting the dotfiles
if [ ! -e $HOME/.homesick/repos/dotfiles ]; then
homeshick clone [email protected]:epilgrim/dotfiles
else
homeshick -f pull dotfiles
fi
homeshick -f link dotfiles
# Setup Vim
mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
ln -fs ~/.vim $XDG_CONFIG_HOME/nvim
ln -fs ~/.vimrc $XDG_CONFIG_HOME/nvim/init.vim
if hash nvim 2>/dev/null; then
nvim +PlugUpgrade +PlugUpdate +qall
elif hash vim 2>/dev/null; then
vim +PlugUpgrade +PlugUpdate +qall
fi
#Installing zsh
ZSH_BIN=`which zsh`
if [ -n $ZSH_BIN ]; then
if [ ! -e ~/.oh-my-zsh ]; then
git clone https://github.com/robbyrussell/oh-my-zsh ~/.oh-my-zsh
fi
if [ ! "$SHELL" = "$ZSH_BIN" ]; then
echo "Dont forget to set $ZSH_BIN as your default shell (chsh -s" $ZSH_BIN ")"
fi
fi
if ! hash ag 2>/dev/null; then
echo "Don't forget to install silversearcher-ag"
fi
if ! hash ctags 2>/dev/null; then
echo "Don't forget to install ctags"
fi
# back to the original directory
cd $pwd