You are here

install-drupal.sh in Lightning API 8.4

Same filename and directory in other branches
  1. 8.3 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 minimal --yes --account-pass admin --db-url $DB_URL
# Install sub-components.
drush pm-enable lightning_api --yes

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

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 minimal --yes --account-pass admin --db-url $DB_URL
  12. # Install sub-components.
  13. drush pm-enable lightning_api --yes
  14. # Make settings writable.
  15. chmod +w $SITE_DIR $SETTINGS