| 1 | #!/bin/bash -xe |
| 2 | . conf/conf |
| 3 | |
| 4 | # install composer if it's not already installed |
| 5 | which composer || (\ |
| 6 | curl -sS https://getcomposer.org/installer | php && \ |
| 7 | mv composer.phar /usr/local/bin/composer && \ |
| 8 | :) && (\ |
| 9 | composer self-update &&\ |
| 10 | :) |
| 11 | |
| 12 | # use composer to install drush7 and the drush launcher |
| 13 | cd /var/www |
| 14 | composer require drush/drush:8.* |
| 15 | # ^^ PLEASE note that we're installing DRUSH 8, not Drupal 8. drush8 works fine with drupal7 |
| 16 | |
| 17 | ## actually don't install the drush launcher because it doesn't work with the latest release of drupal7 |
| 18 | #wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar |
| 19 | #chmod +x drush.phar |
| 20 | #mv drush.phar /usr/local/bin/drush |
| 21 | |
| 22 | # use vendor/bin/drush to download drupal |
| 23 | cd /var/www |
| 24 | vendor/bin/drush dl drupal-7 |
| 25 | |
| 26 | # make drupal our webroot |
| 27 | mv html html-stock |
| 28 | ln -s drupal-7* html |