mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-06 00:05:42 +08:00
Add custom package downloader and extractor
This commit is contained in:
@@ -102,6 +102,17 @@ function osfamily2dir(): string
|
||||
};
|
||||
}
|
||||
|
||||
function osfamily2shortname(): string
|
||||
{
|
||||
return match (PHP_OS_FAMILY) {
|
||||
'Windows', 'WINNT', 'Cygwin' => 'win',
|
||||
'Darwin' => 'macos',
|
||||
'Linux' => 'linux',
|
||||
'BSD' => 'bsd',
|
||||
default => throw new WrongUsageException('Not support os: ' . PHP_OS_FAMILY),
|
||||
};
|
||||
}
|
||||
|
||||
function shell(?bool $debug = null): UnixShell
|
||||
{
|
||||
/* @noinspection PhpUnhandledExceptionInspection */
|
||||
|
||||
Reference in New Issue
Block a user