Skip to content

Commit

Permalink
updated vendors.php script to be more precise about the action (eithe…
Browse files Browse the repository at this point in the history
…r install or update)
  • Loading branch information
fabpot committed Sep 2, 2011
1 parent 74a77af commit e63a840
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions vendors.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,18 @@
foreach ($deps as $dep) {
list($name, $url, $rev) = $dep;

echo "> Installing/Updating $name\n";

$installDir = $vendorDir.'/'.$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)));
}

0 comments on commit e63a840

Please sign in to comment.