You are here

install-drupal.sh in Lightning Layout 8

Same filename and directory in other branches
  1. 8.2 install-drupal.sh
#!/usr/bin/env bash

SITE_DIR=$(pwd)/docroot/sites/default
SETTINGS=$SITE_DIR/settings.php

DB_URL=${DB_URL:-sqlite://db.sqlite}

# Delete previous settings.
if [[ -f $SETTINGS ]]; then
    chmod +w $SITE_DIR $SETTINGS
    rm $SETTINGS
fi

# Install Drupal.
drush site:install standard --yes --config ./drush.yml --account-pass admin --db-url $DB_URL
# Install sub-components.
drush pm-enable entity_block lightning_landing_page --yes

# Make settings writable.
chmod +w $SITE_DIR $SETTINGS

# Copy development settings into the site directory.
cp settings.local.php $SITE_DIR

# Add Acquia Cloud subscription info to settings.php.
echo "if (file_exists('/var/www/site-php')) {" >> $SETTINGS
echo "  require '/var/www/site-php/layoutnightly/layoutnightly-settings.inc';" >> $SETTINGS
echo "  \$settings['install_profile'] = 'standard';" >> $SETTINGS
echo "}" >> $SETTINGS
echo "else {" >> $SETTINGS
echo "  require __DIR__ . '/settings.local.php';" >> $SETTINGS
echo "}" >> $SETTINGS

# Copy PHPUnit configuration into core directory.
cp -f phpunit.xml ./docroot/core

File

install-drupal.sh
View source
  1. #!/usr/bin/env bash
  2. SITE_DIR=$(pwd)/docroot/sites/default
  3. SETTINGS=$SITE_DIR/settings.php
  4. DB_URL=${DB_URL:-sqlite://db.sqlite}
  5. # Delete previous settings.
  6. if [[ -f $SETTINGS ]]; then
  7. chmod +w $SITE_DIR $SETTINGS
  8. rm $SETTINGS
  9. fi
  10. # Install Drupal.
  11. drush site:install standard --yes --config ./drush.yml --account-pass admin --db-url $DB_URL
  12. # Install sub-components.
  13. drush pm-enable entity_block lightning_landing_page --yes
  14. # Make settings writable.
  15. chmod +w $SITE_DIR $SETTINGS
  16. # Copy development settings into the site directory.
  17. cp settings.local.php $SITE_DIR
  18. # Add Acquia Cloud subscription info to settings.php.
  19. echo "if (file_exists('/var/www/site-php')) {" >> $SETTINGS
  20. echo " require '/var/www/site-php/layoutnightly/layoutnightly-settings.inc';" >> $SETTINGS
  21. echo " \$settings['install_profile'] = 'standard';" >> $SETTINGS
  22. echo "}" >> $SETTINGS
  23. echo "else {" >> $SETTINGS
  24. echo " require __DIR__ . '/settings.local.php';" >> $SETTINGS
  25. echo "}" >> $SETTINGS
  26. # Copy PHPUnit configuration into core directory.
  27. cp -f phpunit.xml ./docroot/core