42 lines
1.1 KiB
PHP
Executable File
42 lines
1.1 KiB
PHP
Executable File
#!/usr/bin/env php
|
|
<?php
|
|
|
|
/*
|
|
* This file is part of the Symfony framework.
|
|
*
|
|
* (c) Fabien Potencier <fabien@symfony.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
/*
|
|
|
|
CAUTION: This file installs the dependencies needed to run the I18nRoutingBundle test suite.
|
|
|
|
https://github.com/BeSimple/I18nRoutingBundle
|
|
|
|
*/
|
|
|
|
if (!is_dir($vendorDir = dirname(__FILE__).'/vendor')) {
|
|
mkdir($vendorDir, 0777, true);
|
|
}
|
|
|
|
$deps = array(
|
|
array('symfony', 'http://github.com/symfony/symfony.git', 'origin/HEAD'),
|
|
array('zend', 'http://github.com/zendframework/zf2.git', 'origin/HEAD'),
|
|
);
|
|
|
|
foreach ($deps as $dep) {
|
|
list($name, $url, $rev) = $dep;
|
|
|
|
echo "> Installing/Updating $name\n";
|
|
|
|
$installDir = $vendorDir.'/'.$name;
|
|
if (!is_dir($installDir)) {
|
|
system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)));
|
|
}
|
|
|
|
system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
|
|
}
|