genericifying the drupal7 autobuild
[eostre.git] / drupal-automake-generic / files / install-drupal-toolchain.sh
diff --git a/drupal-automake-generic/files/install-drupal-toolchain.sh b/drupal-automake-generic/files/install-drupal-toolchain.sh
new file mode 100644 (file)
index 0000000..0aa585a
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/bash -xe
+
+# install composer if it's not already installed
+which composer || (\
+       curl -sS https://getcomposer.org/installer | php && \
+       mv composer.phar /usr/local/bin/composer && \
+:) && (\
+       composer self-update &&\
+:)
+
+# use composer to install drush7 and the drush launcher
+cd /var/www
+composer require drush/drush:8.*
+# ^^ PLEASE note that we're installing DRUSH 8, not Drupal 8. drush8 works fine with drupal7
+## actually don't install the drush launcher because it doesn't work with the latest release of drupal7
+#wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/latest/download/drush.phar
+#chmod +x drush.phar
+#mv drush.phar /usr/local/bin/drush
+
+# use vendor/bin/drush to download drupal
+cd /var/www
+vendor/bin/drush dl drupal-7
+
+# make drupal our webroot
+mv html html-stock
+ln -s drupal-7* html