| 1 |
<?php |
<?php |
| 2 |
// $Id: module_builder.drush.inc,v 1.1.2.49 2009/10/24 21:11:03 joachim Exp $ |
// $Id: module_builder.drush.inc,v 1.1.2.50 2009/10/24 22:55:55 joachim Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 135 |
* $drush mb machine_name hookA hookB hookC |
* $drush mb machine_name hookA hookB hookC |
| 136 |
* where 'hookA' is the short name, ie 'menu' not hook_menu'. |
* where 'hookA' is the short name, ie 'menu' not hook_menu'. |
| 137 |
*/ |
*/ |
| 138 |
function module_builder_callback_build() { |
function module_builder_callback_build() { |
|
// Check hook data file exists. |
|
|
if (!_module_builder_check_hook_data()) { |
|
|
return drush_set_error('DRUSH_NOT_COMPLETED', 'No hook definitions found. You need to download hook definitions before using this module.'); |
|
|
} |
|
|
|
|
|
// Include generating component file. |
|
|
module_builder_include('generate'); |
|
|
|
|
| 139 |
$commands = func_get_args(); |
$commands = func_get_args(); |
| 140 |
|
|
| 141 |
// Build the module data. |
// Build the module data. |
| 181 |
//print_r($build_list); |
//print_r($build_list); |
| 182 |
|
|
| 183 |
// Build files. |
// Build files. |
| 184 |
|
// Include generating component file. |
| 185 |
|
module_builder_include('generate'); |
| 186 |
// Build module code in all cases bar 'info'. |
// Build module code in all cases bar 'info'. |
| 187 |
if ($build != 'info') { |
if ($build != 'info') { |
| 188 |
|
// Check hook data file exists. |
| 189 |
|
if (!_module_builder_check_hook_data()) { |
| 190 |
|
return drush_set_error('DRUSH_NOT_COMPLETED', 'No hook definitions found. You need to download hook definitions before using this module.'); |
| 191 |
|
} |
| 192 |
|
|
| 193 |
module_builder_callback_module($commands, $module_data, $build_list); |
module_builder_callback_module($commands, $module_data, $build_list); |
| 194 |
} |
} |
| 195 |
// Build info code in cases 'info' and 'all'. |
// Build info code in cases 'info' and 'all'. |