Example #1
0
 /**
  * Primary entry point for execution of the standalone command.
  *
  * @param string $binDir
  *
  * @throws \Exception
  */
 public static function main($binDir)
 {
     if (getenv('AMPHOME')) {
         $appDir = getenv('AMPHOME');
     } else {
         $appDir = getenv('HOME') . DIRECTORY_SEPARATOR . '.amp';
     }
     $configDirectories = array(dirname($binDir) . '/app/defaults', $appDir);
     $application = new Application('amp', '@package_version@', $appDir, $configDirectories);
     $application->setCatchExceptions(FALSE);
     $application->upgradeIfNeeded();
     $application->run();
 }