Permalink
Browse files

added vendor dir

  • Loading branch information...
1 parent 3c4eee3 commit a64906c534b3bd294e1136792c1b932e0b78cf86 @uklawitter uklawitter committed Feb 17, 2012
Showing with 23 additions and 0 deletions.
  1. +23 −0 vendor/vendors.php
View
@@ -0,0 +1,23 @@
+#!/usr/bin/env php
+<?php
+
+set_time_limit(0);
+
+$vendorDir = __DIR__;
+$deps = array(
+ array('symfony', 'http://github.com/symfony/symfony', isset($_SERVER['SYMFONY_VERSION']) ? $_SERVER['SYMFONY_VERSION'] : '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)));
+}

0 comments on commit a64906c

Please sign in to comment.