wip
This commit is contained in:
18
module/oc_telegram_shop/upload/cli.php
Normal file
18
module/oc_telegram_shop/upload/cli.php
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
if (PHP_SAPI !== 'cli') {
|
||||
die("This script can only be run from CLI.\n");
|
||||
}
|
||||
|
||||
$baseDir = __DIR__;
|
||||
|
||||
$sysLibPath = rtrim(DIR_SYSTEM, '/') . '/library/oc_telegram_shop';
|
||||
$basePath = rtrim(DIR_APPLICATION, '/') . '/..';
|
||||
if (is_readable($sysLibPath . '/oc_telegram_shop.phar')) {
|
||||
require_once "phar://{$sysLibPath}/oc_telegram_shop.phar/vendor/autoload.php";
|
||||
} elseif (is_dir("$basePath/oc_telegram_shop")) {
|
||||
require_once "$basePath/oc_telegram_shop/vendor/autoload.php";
|
||||
} else {
|
||||
throw new RuntimeException('Unable to locate application directory.');
|
||||
}
|
||||
Reference in New Issue
Block a user