Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 135eb56a85
Fetching contributors…

Cannot retrieve contributors at this time

executable file 50 lines (42 sloc) 1.785 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
#!/usr/bin/env php
<?php

/*
Inspiration was taken from: https://raw.github.com/symfony/symfony/master/vendors.php
*/

set_time_limit(0);

// These are the libs to download / update to.
// NOTE 1: Make sure the revisions are compatible with eachother. You can usualy find that information here: http://www.doctrine-project.org/blog/
// NOTE 2: Make sure there is a corresponding entry in .gitignore for each of the dependencies.
// NOTE 3: Make sure there is a class-loader entry in bootstrap.php
$libs = array(
array('doctrine-common', 'git://github.com/doctrine/common.git', '2.1.2'),
array('doctrine-dbal', 'git://github.com/doctrine/dbal.git', '2.1.3'),
array('doctrine-orm', 'git://github.com/doctrine/doctrine2.git', '2.1.2'),
array('doctrine-migrations', 'git://github.com/doctrine/migrations.git', 'origin/master'), // does not use tags.
array('doctrine-data-fixtures', 'git://github.com/doctrine/data-fixtures.git', 'origin/master'), // does not use tags.
array('Symfony/Component/Console', 'git://github.com/symfony/Console.git', 'd7b1718424'), // 2.0.5
array('Symfony/Component/Yaml', 'git://github.com/symfony/Yaml.git', '6d7a0b450f'), // 2.0.5
);

$libdir = dirname(__FILE__).'/lib';
if ( ! is_dir($libdir))
{
mkdir($libdir, 0777, true);
}

foreach ($libs as $lib)
{
list($name, $url, $rev) = $lib;

$installDir = $libdir.'/'.$name;
$install = false;
if ( ! is_dir($installDir))
{
$install = true;
echo "===== Installing $name =====\n";
system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)));
}

if ( ! $install)
{
        echo "===== Updating $name =====\n";
    }

    system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
}
echo "===== DONE =====\n";
Something went wrong with that request. Please try again.