function _drush_make_generate_add_patch_files

8.0.x generate.make.inc _drush_make_generate_add_patch_files(&$project, $location)
6.x generate.make.inc _drush_make_generate_add_patch_files(&$project, $location)
7.x generate.make.inc _drush_make_generate_add_patch_files(&$project, $location)
5.x generate.make.inc _drush_make_generate_add_patch_files(&$project, $location)
master generate.make.inc _drush_make_generate_add_patch_files(&$project, $location)

Record any patches that were applied to this project per information stored in PATCHES.txt.

2 calls to _drush_make_generate_add_patch_files()
_drush_generate_custom_project in commands/make/generate.make.inc
Create a project record for an extension not downloaded from drupal.org
_drush_make_generate_projects in commands/make/generate.make.inc
Generate the $projects makefile array for the current site.

File

commands/make/generate.make.inc, line 157
Functions for the generate makefile command.

Code

function _drush_make_generate_add_patch_files(&$project, $location) {
  $patchfile = DRUPAL_ROOT . '/' . $location . '/PATCHES.txt';
  if (is_file($patchfile)) {
    foreach (file($patchfile) as $line) {
      if (substr($line, 0, 2) == '- ') {
        $project['patches'][] = trim(substr($line, 2));
      }
    }
  }
}