X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fbehat%2Fmink-extension%2Fbuild.php;fp=vendor%2Fbehat%2Fmink-extension%2Fbuild.php;h=e18f5dd501d9a14898ebf0212728d6fd9734c1bb;hp=0000000000000000000000000000000000000000;hb=1270d9129ce8f27c9b28b10518e32132c58e0aca;hpb=c27c0f0cdaa3f354b1fe54a56ae7e854be6e3f68 diff --git a/vendor/behat/mink-extension/build.php b/vendor/behat/mink-extension/build.php new file mode 100755 index 000000000..e18f5dd50 --- /dev/null +++ b/vendor/behat/mink-extension/build.php @@ -0,0 +1,61 @@ + + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +$filename = 'mink_extension.phar'; + +if (file_exists($filename)) { + unlink($filename); +} + +$phar = new \Phar($filename, 0, 'extension.phar'); +$phar->setSignatureAlgorithm(\Phar::SHA1); +$phar->startBuffering(); + +foreach (findFiles('src') as $path) { + $phar->addFromString($path, file_get_contents(__DIR__.'/'.$path)); +} + +$phar->addFromString('init.php', file_get_contents(__DIR__.'/init.php')); + +$phar->setStub(<< + * + * This source file is subject to the MIT license that is bundled + * with this source code in the file LICENSE. + */ + +Phar::mapPhar('extension.phar'); + +return require 'phar://extension.phar/init.php'; + +__HALT_COMPILER(); +STUB +); +$phar->stopBuffering(); + +function findFiles($dir) { + $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir), + RecursiveIteratorIterator::CHILD_FIRST); + + $files = array(); + foreach ($iterator as $path) { + if ($path->isFile()) { + $files[] = $path->getPath().DIRECTORY_SEPARATOR.$path->getFilename(); + } + } + + return $files; +}