blob: 49988bd6057b8137b5e38a364ff3ea37e084fbb6 [file] [log] [blame]
Renuka Apte7bf87af2012-02-02 18:25:35 -08001#i!/bin/sh
Anthony Youngb62b4ca2011-10-26 22:29:08 -07002set -o xtrace
3set -o errexit
4
5# Install basics for vi and git
Renuka Apte7bf87af2012-02-02 18:25:35 -08006yum -y --enablerepo=base install gcc make vim-enhanced zlib-devel openssl-devel curl-devel.i386
Anthony Youngb62b4ca2011-10-26 22:29:08 -07007
8# Simple but usable vimrc
9if [ ! -e /root/.vimrc ]; then
10 cat > /root/.vimrc <<EOF
11syntax on
12se ts=4
13se expandtab
14se shiftwidth=4
15EOF
16fi
17
18# Use the pretty vim
19if [ -e /usr/bin/vim ]; then
20 rm /bin/vi
21 ln -s /usr/bin/vim /bin/vi
22fi
23
Hengqing Hu3b719e52012-03-09 16:03:00 +080024# Install git
Anthony Youngb62b4ca2011-10-26 22:29:08 -070025if ! which git; then
26 DEST=/tmp/
27 GITDIR=$DEST/git-1.7.7
28 cd $DEST
29 rm -rf $GITDIR*
30 wget http://git-core.googlecode.com/files/git-1.7.7.tar.gz
31 tar xfv git-1.7.7.tar.gz
32 cd $GITDIR
Renuka Apte7bf87af2012-02-02 18:25:35 -080033 ./configure --with-curl --with-expat
Anthony Youngb62b4ca2011-10-26 22:29:08 -070034 make install
35fi
36
Renuka Aptec56885a2012-02-29 16:09:26 -080037# Clone devstack
38DEVSTACK=${DEVSTACKROOT:/root/devstack}
39if [ ! -d $DEVSTACK ]; then
40 git clone git://github.com/openstack-dev/devstack.git $DEVSTACK
41fi