forked from ariya/phantomjs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
provision-vm.sh
executable file
·42 lines (34 loc) · 1.06 KB
/
provision-vm.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
#!/usr/bin/env bash
export PATH=$HOME/git/bin:$PATH
if type apt-get >/dev/null 2>&1; then
apt-get update
apt-get install -y build-essential git-core libssl-dev libfontconfig1-dev gdb binutils-gold
fi
if type yum >/dev/null 2>&1; then
yum -y update
yum -y install gcc gcc-c++ make openssl-devel freetype-devel fontconfig-devel
if type git >/dev/null 2>&1; then
echo "Git is already available."
else
yum -y install cpio expat-devel gettext-devel zlib-devel
echo "Downloading and building git..."
rm -rf git-*
wget -nv https://git-core.googlecode.com/files/git-1.8.0.3.tar.gz
tar -xzvf git-1.8.0.3.tar.gz
cd git-1.8.0.3
./configure --prefix=$HOME/git && make -j2 && make install
cd ..
sleep 3
fi
fi
if [[ ! -d phantomjs ]]; then
git clone git://github.com/ariya/phantomjs.git
fi
cd phantomjs
git fetch origin
git reset --hard
git checkout $1
cp /vagrant/build-and-package.sh deploy/
cp /vagrant/package.sh deploy/
deploy/build-and-package.sh
cp deploy/*.tar.bz2 /vagrant