Skip to content

Commit

Permalink
added support for updating multiple projects and paths
Browse files Browse the repository at this point in the history
  • Loading branch information
Ashur Cabrera committed Feb 25, 2015
1 parent 6f482f8 commit 199fff4
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions app/commands.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,24 @@
// --
// update
// --
$update = new Huxtable\Command('update', 'Fetch project updates', function($name='.')
$update = new Huxtable\Command('update', 'Fetch project updates', function()
{
$pug = new Pug\Pug();
return $pug->update($name);
$sources = func_get_args();

if (count ($sources) == 0)
{
$sources[] = '.';
}

for ($i=0; $i < count ($sources); $i++)
{
$pug->update ($sources[$i]);
}
});

$update->addAlias('up');
$update->setUsage("[update|up] [<name>|<path>|all]");
$update->setUsage("update [all|<path>|<project>...]");

$commands['update'] = $update;

Expand Down

0 comments on commit 199fff4

Please sign in to comment.