This commit is contained in:
2025-12-06 19:51:07 +03:00
parent 216ed7e522
commit 389b4ab186
2 changed files with 19 additions and 0 deletions

View 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.');
}