From 45f51d94b4b91112f50980c464350b04fb2e911e Mon Sep 17 00:00:00 2001 From: dmitriitsymbal Date: Fri, 12 Jan 2024 13:12:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=BA=D0=B8=20=D1=81?= =?UTF-8?q?=D0=BA=D1=80=D0=B8=D0=BF=D1=82=D0=B0=20=D1=81=D0=B1=D0=BE=D1=80?= =?UTF-8?q?=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.sh | 5 +++-- cli/update.php | 22 ---------------------- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/build.sh b/build.sh index d78e844..2f5d085 100644 --- a/build.sh +++ b/build.sh @@ -8,8 +8,9 @@ rm -f .idea rm -rf .git rm -rf .github -cd cli -php update.php +mkdir libraries +cd libraries +composer require mpdf/mpdf cd .. rm -rf cli diff --git a/cli/update.php b/cli/update.php index 65add32..dc595fa 100644 --- a/cli/update.php +++ b/cli/update.php @@ -2,32 +2,10 @@ # аргументы --composer /path/to //error_reporting(0); -$config = include __DIR__ . '/config.php'; $path_plugin = __DIR__ . '/../libraries'; $path = __DIR__ . '/../libraries/vendor/mpdf/mpdf/ttfonts'; $manifest_path = __DIR__ . '/../jmpdf.xml'; - -if(isset($argv[2])) -{ - $composer_path = $argv[2]; -} -else -{ - $composer_path = $config['composer_path']; -} - -if (!file_exists($path_plugin)) -{ - if (!mkdir($path_plugin) && !is_dir($path_plugin)) - { - echo "failed to create libraries folder \n"; - die(); - } -} - -shell_exec('cd ' . $path_plugin . '; php ' . $composer_path . ' require mpdf/mpdf'); - $manifest = file_get_contents($manifest_path); $composer_lock = json_decode(file_get_contents($path_plugin . '/composer.lock'), JSON_OBJECT_AS_ARRAY); $mpdf_find_version = '';