#!/usr/bin/env php
<?php

/*
 * This file is part of the symfony package.
 * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
 * 
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

// project exists?
if (file_exists('config/ProjectConfiguration.class.php'))
{
  require_once('config/ProjectConfiguration.class.php');
  $dir = sfCoreAutoload::getInstance()->getBaseDir();
}
else
{
  if (is_readable(dirname(__FILE__).'/../../lib/autoload/sfCoreAutoload.class.php'))
  {
    // SVN
    $dir = realpath(dirname(__FILE__).'/../../lib');
  }
  else
  {
    // PEAR
    $dir = '@PEAR-DIR@/symfony';

    if (!is_dir($dir))
    {
      throw new Exception('Unable to find symfony libraries');
    }
  }
}

include($dir.'/command/cli.php');
