increment v_js_includes (#6403)
[openemr.git] / bin / command-runner
blobe9972936a0c7de36c1cf1fbf6dbb09100c3b5c8c
1 #!/usr/bin/php
2 <?php
3 /**
4 * command-runner.php Handles the loading and running of OpenEMR commands that leverage the php namespaces.
5 * Preference would be to use something like Symfony/Console but we are attempting to avoid too many dependencies so
6 * we have written this simplified command runner for dev & openemr administration needs
7 * @package openemr
8 * @link http://www.open-emr.org
9 * @author Stephen Nielson <stephen@nielson.org>
10 * @copyright Copyright (c) 2021 Stephen Nielson <stephen@nielson.org>
11 * @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
13 $rootPath = dirname(__DIR__) . DIRECTORY_SEPARATOR;
14 require_once $rootPath . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
17 use OpenEMR\Common\Command\Runner\CommandRunner;
19 if (php_sapi_name() !== 'cli') {
20 echo "Only php cli can execute a command\n";
21 die();
24 $commandRunner = new CommandRunner($rootPath, pathinfo(__FILE__, PATHINFO_FILENAME));
25 $commandRunner->run();
26 exit;