/vendor/vendors.php
http://github.com/FriendsOfSymfony/FOSFacebookBundle · PHP · 36 lines · 20 code · 7 blank · 9 comment · 2 complexity · bc7c8c741218e275572ce31a350b76c0 MD5 · raw file
- #!/usr/bin/env php
- <?php
- /*
- * This file is part of the FOSFacebookBundle package.
- *
- * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
- set_time_limit(0);
- if (isset($argv[1])) {
- $_SERVER['SYMFONY_VERSION'] = $argv[1];
- }
- $vendorDir = __DIR__;
- $deps = array(
- array('symfony', 'http://github.com/symfony/symfony', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : 'origin/master'),
- array('facebook', 'git://github.com/facebook/php-sdk.git', 'origin/master'),
- array('twig', 'http://github.com/fabpot/Twig', 'origin/master'),
- );
- 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 -q %s %s', escapeshellarg($url), escapeshellarg($installDir)));
- }
- system(sprintf('cd %s && git fetch -q origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
- }