forked from byrnexu/betterquant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile-vim-with-gdb.sh
50 lines (39 loc) · 1.5 KB
/
compile-vim-with-gdb.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
#!/bin/bash
set -xue
mkdir -p /tmp/install && cd /tmp/install
# install dev env
if [[ ! -e vim-7.4.tar.bz2 ]]; then
wget ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2
fi
if [[ ! -e vimgdb-for-vim74.zip ]]; then
wget https://github.com/larrupingpig/vimgdb-for-vim7.4/archive/master.zip -O vimgdb-for-vim74.zip
fi
rm -rf /tmp/vim*
tar xjvf vim-7.4.tar.bz2 -C /tmp
unzip vimgdb-for-vim74.zip -d /tmp
cd /tmp && patch -p0 < vimgdb-for-vim7.4-master/vim74.patch
cd vim74/src
./configure \
--enable-gdb \
--enable-multibyte \
--enable-fontset --enable-xim \
--enable-gui=auto \
--enable-rubyinterp=dynamic \
--enable-rubyinterp --enable-cscope \
--enable-sniff \
--enable-luainterp=dynamic \
--with-x --with-features=huge
make CFLAGS="-O2 -D_FORTIFY_SOURCE=1"
make CFLAGS="-O2 -D_FORTIFY_SOURCE=1" install
ln -sf /opt/bin/vim /usr/bin/vi
# install amix vimrc
if [[ ! -e ~/.vim_runtime ]]; then
git clone --depth=1 https://github.com/amix/vimrc.git ~/.vim_runtime
sh ~/.vim_runtime/install_awesome_vimrc.sh
cp -r /tmp/vimgdb-for-vim7.4-master/vimgdb_runtime/ /root/.vim_runtime/sources_non_forked/
echo run macros/gdb_mappings.vim >> ~/.vim_runtime/my_configs.vim
git clone https://github.com/ervandew/supertab /root/.vim_runtime/sources_non_forked/supertab
git clone https://github.com/vim-scripts/taglist.vim /root/.vim_runtime/sources_non_forked/taglist
git clone https://github.com/vim-scripts/a.vim.git /root/.vim_runtime/sources_non_forked/a
fi
cd -