You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.3 KiB
43 lines
1.3 KiB
#!/bin/bash |
|
echo "Setup database for Drupal" |
|
mysql -u root -e 'create database drupal;' |
|
mysql -u root -e "GRANT ALL PRIVILEGES ON drupal.* To 'drupal'@'localhost' IDENTIFIED BY 'drupal';" |
|
|
|
if [ $TRAVIS_PHP_VERSION = "5.6" ]; then |
|
phpenv config-add $SCRIPT_DIR/php56.ini |
|
fi |
|
|
|
echo "Install utilities needed for testing" |
|
mkdir /opt/utils |
|
cd /opt/utils |
|
composer require squizlabs/php_codesniffer |
|
composer require drupal/coder |
|
composer require sebastian/phpcpd |
|
sudo ln -s /opt/utils/vendor/bin/phpcs /usr/bin/phpcs |
|
sudo ln -s /opt/utils/vendor/bin/phpcpd /usr/bin/phpcpd |
|
phpenv rehash |
|
phpcs --config-set installed_paths /opt/utils/vendor/drupal/coder/coder_sniffer |
|
|
|
echo "Composer install drupal site" |
|
cd /opt |
|
git clone https://github.com/Islandora-CLAW/drupal-project.git drupal |
|
cd drupal |
|
composer install |
|
|
|
echo "Setup Drush" |
|
sudo ln -s /opt/drupal/vendor/bin/drush /usr/bin/drush |
|
phpenv rehash |
|
|
|
echo "Drush setup drupal site" |
|
cd web |
|
drush si --db-url=mysql://drupal:drupal@localhost/drupal --yes |
|
drush runserver --php-cgi=$HOME/.phpenv/shims/php-cgi localhost:8081 &>/tmp/drush_webserver.log & |
|
|
|
echo "Enable simpletest module" |
|
drush en -y simpletest |
|
|
|
echo "Setup ActiveMQ" |
|
cd /opt |
|
wget "http://archive.apache.org/dist/activemq/5.14.3/apache-activemq-5.14.3-bin.tar.gz" |
|
tar -xzf apache-activemq-5.14.3-bin.tar.gz |
|
apache-activemq-5.14.3/bin/activemq start
|
|
|