-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·154 lines (133 loc) · 4.21 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#!/bin/bash
dotfiles="$HOME/dotfiles"
# Install apt packages
echo "********************"
echo "Installing aptitude packages"
echo "********************"
sudo apt-get install python python-pip build-essential htop tmux liblua5.1-dev luajit libluajit-5.1 zsh rubygems
gem install tmuxinator
# Install pip packages
echo "********************"
echo "Installing pip packages"
echo "********************"
pip install powerline-status --user
# Install RVM
echo "********************"
echo "Installing RVM"
echo "********************"
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable --ruby
# Install and compile vim
if [[ ! -f "/usr/local/bin/vim" ]]
then
echo "********************"
echo "Compiling vim..."
echo "********************"
sudo mkdir /usr/include/lua5.1/include
sudo mv /usr/include/lua5.1/*.h /usr/include/lua5.1/include/
cd /tmp
git clone https://github.com/b4winckler/vim.git
cd vim/src
make distclean
./configure --with-features=huge --enable-pythoninterp --enable-rubyinterp --enable-luainterp --with-luajit --with-lua-prefix=/usr/include/lua5.1 --with-python-config-dir=/usr/lib/python2.7/config
make
sudo make install
else
echo "********************"
echo "VIM already installed"
echo "********************"
fi
# Setup vim
echo "********************"
echo "Checking VIM config"
echo "********************"
target="${HOME}/.vim"
source="${HOME}/dotfiles/vim"
if [[ "$(readlink -- "$target")" != $source ]]
then
echo "********************"
echo "Creating VIM symlink..."
echo "********************"
sudo ln -s $source $target
else
echo "********************"
echo "VIM config already installed"
echo "********************"
fi
echo "********************"
echo "Checking if submodules need an update"
echo "********************"
git submodule update --recursive --init
# Setup ZSH
if [[ "$(readlink -- "$HOME/.zshrc")" != "$dotfiles/zsh/.zshrc" ]]
then
echo "********************"
echo "Creating zshrc symlink..."
echo "********************"
sudo ln -s $dotfiles/zsh/.zshrc $HOME/.zshrc
else
echo "********************"
echo "zshrc config already installed"
echo "********************"
fi
if [[ "$(readlink -- "$HOME/.zlogin")" != "$dotfiles/zsh/.zlogin" ]]
then
echo "********************"
echo "Creating zshlogin symlink..."
echo "********************"
sudo ln -s $dotfiles/zsh/.zlogin $HOME/.zlogin
else
echo "********************"
echo "zlogin config already installed"
echo "********************"
fi
# Setup tmux config
if [[ "$(readlink -- "$HOME/.tmux.conf")" != "$dotfiles/tmux/.tmux.conf" ]]
then
echo "********************"
echo "Creating tmux.conf symlink..."
echo "********************"
sudo ln -s $dotfiles/tmux/.tmux.conf $HOME/.tmux.conf
else
echo "********************"
echo "tmux.conf config already installed"
echo "********************"
fi
if [[ "$(readlink -- "$HOME/.tmux-colors.conf")" != "$dotfiles/tmux/.tmux-colors.conf" ]]
then
echo "********************"
echo "Creating tmux-colors.conf symlink..."
echo "********************"
sudo ln -s $dotfiles/tmux/.tmux-colors.conf $HOME/.tmux-colors.conf
else
echo "********************"
echo "tmux-colors.conf config already installed"
echo "********************"
fi
if [[ "$(readlink -- "$HOME/.tmuxinator")" != "$dotfiles/tmuxinator" ]]
then
echo "********************"
echo "Creating tmuxinator symlink..."
echo "********************"
sudo ln -s $dotfiles/tmuxinator $HOME/.tmuxinator
else
echo "********************"
echo "tmuxinator config already installed"
echo "********************"
fi
# Setup powerline
if [[ "$(readlink -- "$HOME/.config/powerline")" != "$dotfiles/powerline" ]]
then
echo "********************"
echo "Creating powerline symlink..."
echo "********************"
if [[ ! -d "$HOME/.config" ]]
then
mkdir $HOME/.config
fi
sudo ln -s $dotfiles/powerline $HOME/.config/powerline
else
echo "********************"
echo "powerline config already installed"
echo "********************"
fi