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