14 lines
279 B
Plaintext
14 lines
279 B
Plaintext
|
#!/usr/bin/env php
|
||
|
<?php
|
||
|
|
||
|
if ($argc === 1) {
|
||
|
echo 'Error: No sub-command provided. Please specify a sub-command' . PHP_EOL;
|
||
|
die();
|
||
|
}
|
||
|
|
||
|
try {
|
||
|
require_once(dirname($_SERVER['SCRIPT_NAME']) . "/{$argv[1]}.php");
|
||
|
} catch (err) {
|
||
|
echo "Unknown sub-command '$argv[1]'" . PHP_EOL;
|
||
|
}
|