Some checks are pending
Telegram Mini App Shop Builder / Compute version metadata (push) Waiting to run
Telegram Mini App Shop Builder / Run Frontend tests (push) Waiting to run
Telegram Mini App Shop Builder / Run Backend tests (push) Waiting to run
Telegram Mini App Shop Builder / Run PHP_CodeSniffer (push) Waiting to run
Telegram Mini App Shop Builder / Build module. (push) Blocked by required conditions
Telegram Mini App Shop Builder / release (push) Blocked by required conditions
18 lines
343 B
PHP
18 lines
343 B
PHP
<?php
|
|
|
|
$pharFile = $argv[1] ?? null;
|
|
$dstPath = $argv[2] ?? null;
|
|
|
|
if (! $dstPath) {
|
|
throw new InvalidArgumentException('Dst path must be provided');
|
|
}
|
|
|
|
if (! $pharFile) {
|
|
throw new InvalidArgumentException('Phar file must be provided');
|
|
}
|
|
|
|
$phar = new Phar($pharFile);
|
|
$phar->extractTo($dstPath);
|
|
|
|
echo "Phar extracted: $pharFile\n";
|