4 ini_set("display_errors", 0);
5 ini_set("log_errors", 1);
9 function check(&$procs) {
10 foreach ($procs as $dir => list($prc, $fds, $pkg)) {
11 $status = proc_get_status($prc);
12 if (!$status["running"]) {
13 array_map("fclose", $fds);
15 if (!$status["exitcode"]) {
16 printf("%s\t%s\n", $pkg, $dir);
24 while (!feof(STDIN
)) {
25 if (strlen($line = rtrim(fgets(STDIN
)))) {
26 if (list($pkg, $ver, $tgz) = explode("\t", $line)) {
27 $dir = basename($tgz, ".tgz");
28 $ext = sprintf("%s/../public/phars/%s/%s-%s.ext.phar", __DIR__
, $pkg, $pkg, $ver);
31 $prc = proc_open("tar -xf $tgz --transform='s#^package\\(2\\)\\{0,1\\}\\.xml$#$dir/package.xml#' 2>&1", [
33 ], $fds, __DIR__
."/../build");
34 $procs[$dir] = [$prc, $fds, $pkg];
41 while (check($procs)) {