-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·150 lines (129 loc) · 4.33 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
#!/bin/bash
function ask()
{
while true; do
read -p "$2" choice
case $choice in
[Yy]* )
declare -g "$1=true"
break;
;;
[Nn]* )
declare -g "$1=false"
break;
;;
*)
echo "Please enter y or n"
;;
esac
done
}
ask UPGRADE "Update & upgrade every thing? (y/n): "
ask DOTFILE "Using Modified Dotfile? [including tons of plugins] (y/n): "
if $UPGRADE; then
echo "+==========================+"
echo "|Updating & Upgrading..... |"
echo "+==========================+"
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y autoremove
fi
if $DOTFILE; then
echo "+===========================================+"
echo "|Deploying Dotfile & Installing plugins.....|"
echo "+===========================================+"
#Install essentials
sudo apt-get install -y curl build-essential cmake python-dev python-pip python3-pip git bash-completion
sudo pip install pip --upgrade
#set /opt's owner
sudo chown -R $(whoami) /opt
#Overwrite Dotfile
cp ./.bashrc ~/
cp ./.vimrc ~/
cp ./.tmux.conf ~/
cp ./.screenrc ~/
cp ./.editorconfig ~/
#Sourcing bashrc
source ~/.bashrc
#Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
source ~/.bashrc
nvm install v10
#Compile vim from source
sudo apt-get install -y libncurses5-dev libgnome2-dev libgnomeui-dev \
libgtk2.0-dev libatk1.0-dev libbonoboui2-dev \
libcairo2-dev libx11-dev libxpm-dev libxt-dev python-dev \
python3-dev ruby-dev lua5.1 lua5.1-dev libperl-dev git
sudo apt-get remove -y vim vim-runtime
cd /opt
git clone https://github.com/vim/vim.git
cd vim/
./configure --with-features=huge \
--enable-multibyte \
--enable-rubyinterp=yes \
--enable-python3interp=yes \
--with-python3-config-dir=$(python3-config --configdir) \
--enable-perlinterp=yes \
--enable-luainterp=yes \
--enable-gui=gtk2 \
--enable-cscope \
--prefix=/usr/local
make VIMRUNTIMEDIR=/usr/local/share/vim/vim82
sudo make install
sudo update-alternatives --install /usr/bin/editor editor /usr/bin/vim 1
sudo update-alternatives --set editor /usr/bin/vim
sudo update-alternatives --install /usr/bin/vi vi /usr/bin/vim 1
sudo update-alternatives --set vi /usr/bin/vim
cd ~/
sudo rm -rf /opt/vim
#Install powerline-status
#Install with python version 3 to prevent python2 EOL
sudo pip3 install powerline-status
sudo apt-get install -y powerline
#Install patcher monaco font
cd ~/dotfiles
git clone https://github.com/powerline/fontpatcher ~/fontpatcher
sudo apt-get install -y python-fontforge
python ~/fontpatcher/scripts/powerline-fontpatcher monaco_powerline.ttf
rm -rf ~/fontpatcher
#Install ctag
cd ~/
sudo apt-get install -y gcc make pkg-config autoconf automake python3-docutils libseccomp-dev libjansson-dev libyaml-dev libxml2-dev
git clone https://github.com/universal-ctags/ctags
cd ctags/
./autogen.sh
./configure
make
sudo make install
cd ../
rm -rf ctags
#Install for deoplete
sudo pip3 install --upgrade pynvim
sudo pip3 install --upgrade neovim
#Install linters
sudo apt-get install -y clang
sudo pip3 install pylint
npm install -g eslint
#Install vim plugins
curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
vim +PlugInstall
#Install ag
sudo apt install silversearcher-ag
#Install tmux-memory-status
git clone https://github.com/racterub/tmux-mem-cpu-load.git ~/.tmux
cd ~/.tmux/
cmake .
sudo make
sudo make install
#Install virtualenv virtualenvwrapper
sudo pip3 install virtualenv virtualenvwrapper
sudo pip3 install pipenv
fi
echo ""
echo ""
echo "** YOU NEED TO RESTART YOUR TERMINAL OR RE-SSH TO ACTIVATE VIRTUALENV **"
echo "===================================="
echo "| Installation Done |"
echo "===================================="
echo " - Racterub"