Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage is php cli/aura Vendor.Package command , so this is mapped as /pac... #32

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 24 additions & 0 deletions cli/aura
@@ -0,0 +1,24 @@
<?php
require dirname(__DIR__) . '/package/Aura.Framework/src/Aura/Framework/Bootstrap/Factory.php';
$factory = new \Aura\Framework\Bootstrap\Factory;
$cli = $factory->newInstance('cli');
if (isset($argv[1]) && isset($argv[2])) {
try {
$package = dirname(__DIR__) .
DIRECTORY_SEPARATOR . 'package' .
DIRECTORY_SEPARATOR . $argv[1];

if (is_dir($package)) {
$cmd = DIRECTORY_SEPARATOR . 'cli' .
DIRECTORY_SEPARATOR . $argv[2];
$return = $cli->exec($package . $cmd);
exit($return);
} else {
echo "Package doesn't exists" . PHP_EOL;
}
} catch (Exception $e) {
throw new Exception($e);
}
} else {
echo "Expecting argument package and command" . PHP_EOL;
}