add imagemagick (imagick) for macos, pkg-config for unix.=

This commit is contained in:
crazywhalecc
2023-05-10 02:04:08 +08:00
parent 9daa10e939
commit 7527f9f099
24 changed files with 229 additions and 11 deletions

View File

@@ -66,6 +66,8 @@ function osfamily2dir(): string
}
/**
* 执行shell直接输出在终端出现错误抛出异常
*
* @throws \SPC\exception\RuntimeException
*/
function f_passthru(string $cmd): ?bool
@@ -89,7 +91,13 @@ function f_passthru(string $cmd): ?bool
return $ret;
}
function f_exec(string $command, &$output, &$result_code)
/**
* 执行命令,不输出内容,返回执行结果和内容
*
* @param mixed $output
* @param mixed $result_code
*/
function f_exec(string $command, &$output, &$result_code): bool|string
{
logger()->debug('Running command (no output) : ' . $command);
return exec($command, $output, $result_code);