3
0

upd(codegen): xargs fix, debug codegen to stderr

This commit is contained in:
Tit Petric
2018-08-15 17:23:53 +02:00
parent 69e1333722
commit 92484d6ba4
2 changed files with 8 additions and 1 deletions

View File

@@ -45,6 +45,10 @@ $tpl->add_default("newline", "\n");
$generators = array();
exec("find -L " . __DIR__ . "/" . $project . " -name index.php", $generators);
if (getenv("DEBUG") === "true") {
fprintf(STDERR, print_r($generators, true));
}
$api_files = glob($project . "/docs/src/spec/*.json");
$apis = array_map(function($filename) {
$api = array_change_key_case_recursive(json_decode(file_get_contents($filename), true));
@@ -87,6 +91,9 @@ foreach ($generators as $generator) {
mkdir($dirname, 0777, true);
}
$common = compact("parsers", "project");
if (getenv("DEBUG") === "true") {
fprintf(STDERR, print_r($common, true));
}
include($generator);
}