2014-12-24 13:51:38 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
2014-12-28 05:20:01 +00:00
|
|
|
su - vagrant
|
|
|
|
### Setup NPM globals and create necessary directories ###
|
2015-03-05 23:15:36 +00:00
|
|
|
sudo apt-get install -y phantomjs zsh exuberant-ctags
|
2014-12-28 05:20:01 +00:00
|
|
|
mkdir /home/vagrant/npm
|
|
|
|
sudo chown -R vagrant:vagrant /home/vagrant
|
2015-03-08 00:57:14 +00:00
|
|
|
|
2014-12-28 05:20:01 +00:00
|
|
|
cp /vagrant/scripts/aliases ~/.aliases
|
|
|
|
|
|
|
|
### Create rc file ###
|
|
|
|
if [ -e "/home/vagrant/.zshrc" ]
|
|
|
|
then
|
|
|
|
echo "source ~/.aliases" >> ~/.zshrc
|
|
|
|
else
|
|
|
|
echo "source ~/.aliases" >> ~/.bashrc
|
|
|
|
fi
|
|
|
|
|
|
|
|
### Set up environment files and database ###
|
2015-05-07 04:28:17 +00:00
|
|
|
cp /vagrant/system/.env.example /vagrant/system/.env
|
2014-12-28 05:20:01 +00:00
|
|
|
mysql -u root -proot -e 'create database flarum'
|
2015-04-02 21:52:44 +00:00
|
|
|
|
2015-04-02 23:51:20 +00:00
|
|
|
### Setup flarum/core and install dependencies ###
|
2015-05-07 04:28:17 +00:00
|
|
|
cd /vagrant/system/core
|
2015-03-05 23:50:24 +00:00
|
|
|
composer install --prefer-dist
|
2015-05-07 04:28:17 +00:00
|
|
|
cd /vagrant/system
|
2015-04-02 23:51:20 +00:00
|
|
|
composer install --prefer-dist
|
|
|
|
composer dump-autoload
|
2015-04-02 21:52:44 +00:00
|
|
|
|
2015-05-08 12:57:02 +00:00
|
|
|
cd /vagrant/system/core/js
|
2015-03-29 12:05:44 +00:00
|
|
|
bower install
|
2015-05-08 12:57:02 +00:00
|
|
|
cd /vagrant/system/core/js/forum
|
2014-12-28 05:20:01 +00:00
|
|
|
npm install
|
2015-05-07 04:28:17 +00:00
|
|
|
gulp
|
2015-05-08 12:57:02 +00:00
|
|
|
cd /vagrant/system/core/js/admin
|
2015-05-07 04:28:17 +00:00
|
|
|
npm install
|
|
|
|
gulp
|
2014-12-24 13:51:38 +00:00
|
|
|
|
2015-05-08 12:57:02 +00:00
|
|
|
cd /vagrant/system
|
2015-05-07 04:28:17 +00:00
|
|
|
php artisan vendor:publish
|
2015-02-24 10:07:26 +00:00
|
|
|
php artisan flarum:install
|
|
|
|
php artisan flarum:seed
|