Change special * module to 'all' because of bash expansions

This commit is contained in:
Starbeamrainbowlabs 2015-10-04 13:36:58 +01:00
parent 4a8f0d608a
commit 9272938530
2 changed files with 3 additions and 3 deletions

View File

@ -1,2 +1,2 @@
#!/usr/bin/env bash #!/usr/bin/env bash
php build.php php build.php $*

View File

@ -10,10 +10,10 @@ $module_index = json_decode(file_get_contents("module_index.json"));
$module_list = []; $module_list = [];
foreach($module_index as $module) foreach($module_index as $module)
{ {
// If the module is optional, the module's id isn't present in the command line arguments, and the special '*' module id wasn't passed in, skip it // If the module is optional, the module's id isn't present in the command line arguments, and the special 'all' module id wasn't passed in, skip it
if($module->optional && if($module->optional &&
strrpos(implode(" ", $argv), $module->id) === false && strrpos(implode(" ", $argv), $module->id) === false &&
!in_array("*", $argv)) continue; !in_array("all", $argv)) continue;
$module_list[] = $module->id; $module_list[] = $module->id;
} }