-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbootstrap.sh
executable file
·53 lines (37 loc) · 1.3 KB
/
bootstrap.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
#!/usr/bin/env bash
# Just a simple way of checking if you we need to install everything
if [ ! -d "/var/www" ]
then
# Update and begin installing some utility tools
sudo apt-get -y update
sudo apt-get install -y python-software-properties git curl build-essential apache2
# vboxfs doesn't support sendfile, turn that off
sudo echo "EnableSendfile off" >> /etc/apache2/apache2.conf
sudo service apache2 restart
# Build latest node.js from source
cd /tmp
sudo git clone -b v0.10.22-release https://github.com/joyent/node.git
cd node
sudo ./configure
sudo make
sudo make install
sudo npm install -g bower
fi
sudo rm -r /home/vagrant/tmp
if [ -d "/home/vagrant/oerpub" ]
then
rm -rf /home/vagrant/oerpub
fi
cp -r /vagrant /home/vagrant/oerpub
cd /home/vagrant/oerpub/github-bookeditor
npm install
sudo rm /var/www/*
for i in `ls`; do sudo ln -s /vagrant/github-bookeditor/$i /var/www/$1; done
cd /home/vagrant/oerpub/github-bookeditor/bower_components
rm -rf aloha-editor bookish
ln -s /vagrant/Aloha-Editor aloha-editor
ln -s /vagrant/bookish bookish
cd /var/www
sudo rm bower_components node_modules
sudo ln -s /home/vagrant/oerpub/github-bookeditor/bower_components bower_components
sudo ln -s /home/vagrant/oerpub/github-bookeditor/node_modules node_modules