Skip to content

Commit de61474

Browse files
committedMay 23, 2011
moved vendors.sh to PHP
1 parent ab4352c commit de61474

File tree

2 files changed

+38
-59
lines changed

2 files changed

+38
-59
lines changed
 

‎vendors.php

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
/*
5+
* This file is part of the Symfony framework.
6+
*
7+
* (c) Fabien Potencier <fabien@symfony.com>
8+
*
9+
* For the full copyright and license information, please view the LICENSE
10+
* file that was distributed with this source code.
11+
*/
12+
13+
if (!is_dir($vendorDir = dirname(__FILE__).'/vendor')) {
14+
mkdir($vendorDir, 0777, true);
15+
}
16+
17+
$deps = array(
18+
array('assetic', 'http://github.com/kriswallsmith/assetic.git', 'origin/HEAD'),
19+
array('doctrine', 'http://github.com/doctrine/doctrine2.git', '2.0.5'),
20+
array('doctrine-dbal', 'http://github.com/doctrine/dbal.git', '2.0.5'),
21+
array('doctrine-common', 'http://github.com/doctrine/common.git', 'origin/3.0.x'),
22+
array('monolog', 'http://github.com/Seldaek/monolog.git', 'origin/HEAD'),
23+
array('swiftmailer', 'http://github.com/swiftmailer/swiftmailer.git', 'origin/4.1'),
24+
array('twig', 'http://github.com/fabpot/Twig.git', 'origin/HEAD'),
25+
);
26+
27+
foreach ($deps as $dep) {
28+
list($name, $url, $rev) = $dep;
29+
30+
echo "> Installing/Updating $name\n";
31+
32+
$installDir = $vendorDir.'/'.$name;
33+
if (!is_dir($installDir)) {
34+
system(sprintf('git clone %s %s', $url, $installDir));
35+
}
36+
37+
system(sprintf('cd %s && git fetch origin && git reset --hard %s', $installDir, $rev));
38+
}

‎vendors.sh

-59
This file was deleted.

0 commit comments

Comments
 (0)