-
Notifications
You must be signed in to change notification settings - Fork 1
/
matavimbuild.sh
executable file
·65 lines (52 loc) · 1.8 KB
/
matavimbuild.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/bash
echo '-------script start----------'
if [ ! -d $HOME/local ]; then
mkdir -p $HOME/local/src/
fi
if [ ! -d $HOME/local/src/vim ]; then
hg clone https://vim.googlecode.com/hg/ $HOME/local/src/vim
fi
if [ `uname` = "Darwin" ]; then
if [ ! -d /usr/local/Cellar/lua ]; then
brew install lua luajit;
fi
elif [ `uname` = "Linux" ]; then
if [ ! -d /usr/include/lua5.2 ]; then
# ubuntu
sudo apt-get install lua5.2 lua5.2-dev luajit -y;
sudo apt-get install libperl-dev python-dev ruby-dev -y;
fi
fi
echo '-------build start----------'
cd $HOME/local/src/vim
if [ ! -f /usr/local/bin/hg ]; then
if [ -f $VIRTUAL_ENV/bin/activate ]; then
source $VIRTUAL_ENV/bin/activate
fi
echo 'hg どこや'
exit 1
fi
# 本当は hg out |echo $? で終了ステータスみて更新なかったら exit 0 したい
# けど終了ステータスのとりかたがわからないからいまはてきとうに全部ビルドしてる
# if [ `hg out | echo $?` -eq 1 ]; then
# echo '更新ないで'
# exit 0
# fi
hg pull
hg up -C
make clean
make distclean
if [ `uname` = "Darwin" ]; then
./configure --with-features=huge --enable-cscope --enable-perlinterp --enable-pythoninterp --enable-multibyte --enable-rubyinterp --disable-selinux --enable-luainterp --with-lua-prefix=/usr/local/Cellar/lua/5.1.5 -enable-fail-if-missing --prefix=$HOME/local/
elif [ `uname` = "Linux" ]; then
./configure --with-features=huge --enable-cscope --enable-perlinterp --enable-pythoninterp --enable-multibyte --enable-rubyinterp --disable-selinux --enable-luainterp -enable-fail-if-missing --prefix=$HOME/local/
fi
make
make install
cd $HOME
echo '-------build end ----------'
if [ ! -f $HOME/local/bin/vi ]; then
ln -s $HOME/local/bin/vim $HOME/local/bin/vi
fi
vi --version
echo '-------script end----------'