5 $stderr = fopen('php://stderr', 'w');
7 require dirname(__FILE__
) . '/Packager/packager.php';
9 $executable = array_shift($argv);
10 $package = dirname(__FILE__
);
12 $pkg = new Packager($package);
14 fwrite($stderr, "\nPackager is building $package\n\n");
15 fwrite($stderr, "Included Components:\n");
19 foreach ($argv as $arg){
20 if ($arg == '-1.2compat'){
21 array_erase($argv, $arg);
27 $files = (empty($argv)) ?
$pkg->get_all_files() : $pkg->components_to_files($argv);
29 foreach ($files as $file){
30 fwrite($stderr, "- $file: [" . implode(", ", $pkg->get_file_provides($file)) . "]\n");
33 fwrite($stderr, "\n");
35 $output = $pkg->build_from_files($files);
37 if ($no_compat) $output = preg_replace("%//<1\.2compat>.*?//</1.2compat>%s", '', $output);