ENABLED_MODULES="$($DRUSH pm-list --type=module --status=enabled --pipe | tr '\n' ',')"
ENABLED_THEMES="$($DRUSH pm-list --type=theme --status=enabled --pipe | tr '\n' ',')"
-rm -rf "${WEB_ROOT}/profiles/$PROFILE_MACHINE_NAME"
$DRUPAL_CONSOLE generate:profile \
--profile="$PROFILE_TITLE" \
--machine-name="$PROFILE_MACHINE_NAME" \
--description="Drupal installation profile for $PROFILE_TITLE" \
--dependencies=$ENABLED_MODULES \
--themes=$ENABLED_THEMES \
+ --profile-path="$PROJECT_ROOT" \
--no-interaction
-cp -a "${WEB_ROOT}/profiles/${PROFILE_MACHINE_NAME}" "$PROJECT_ROOT"
# Basically do what's suggested in the "Configuration" section here:
# https://www.drupal.org/docs/8/creating-distributions/how-to-write-a-drupal-8-installation-profile