create-profile.sh: make detection of the default_content module more robust
[drupal-init-tools.git] / libexec / create-profile.sh
index 62a5b01..370963d 100755 (executable)
@@ -136,7 +136,7 @@ find "${PROFILE_DEST_DIR}/config/install" -type f -exec sed -i -e '/^_core: {  }
 #fdupes -f -1 "${WEB_ROOT}/core/profiles/standard/config/install/" "${PROFILE_DEST_DIR}/config/install/" | xargs rm
 
 # Export the default content if the default_content module is there
-if echo "$ENABLED_MODULES" | grep -q default_content;
+if $DRUSH pm-list --type=module --field=name --status=enabled --pipe | grep -q "^default_content$";
 then
   $DRUSH default-content-export-references --folder="${PROFILE_DEST_DIR}/content" node
 fi