You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
postfixadmin/tests/simpletest/packages/transform_all_lastcraft.php

17 lines
522 B
PHP

<?php
$transform = $argv[1];
$source_path = $argv[2];
$destination_path = $argv[3];
$dir = opendir($source_path);
while (($file = readdir($dir)) !== false) {
if (! preg_match('/\.xml$/', $file)) {
continue;
}
$source = $source_path . $file;
$destination = $destination_path .
preg_replace('/\.xml$/', '.php', basename($source));
$command = "Xalan -o $destination $source $transform\n";
`$command`;
}
closedir($dir);
?>