forked from jedi4ever/devopsdays-webby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
26 lines (20 loc) · 747 Bytes
/
bootstrap.sh
File metadata and controls
26 lines (20 loc) · 747 Bytes
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
#!/usr/bin/env bash
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y apache2 libonig-dev libxml2-dev libxslt-dev git git-doc
curl https://raw.githubusercontent.com/fesplugas/rbenv-installer/master/bin/rbenv-installer | bash
sed -i '$ a\\nexport RBENV_ROOT="${HOME}/.rbenv"\n\nif [ -d "${RBENV_ROOT}" ]; then\nexport PATH="${RBENV_ROOT}/bin:${PATH}"\neval "$(rbenv init -)"\nfi\n\n' ~/.profile
source ~/.profile
rbenv bootstrap-ubuntu-12-04
CONFIGURE_OPTS=--without-tk rbenv install 1.8.7-p370
rbenv rehash
rbenv global 1.8.7-p370
gem install bundler
cd /vagrant
bundle install
cd site
webby build
sudo rm -rf /var/www
sudo ln -fs /vagrant/site/output/ /var/www
sudo /etc/init.d/apache2 stop
sudo /etc/init.d/apache2 start