mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-26 16:26:44 +03:00
Added: support plugins als .phar files
This commit is contained in:
parent
46ff83c41d
commit
1e13725768
4 changed files with 77 additions and 22 deletions
|
|
@ -52,6 +52,15 @@ if (isset($options['plugins'])) {
|
|||
$tar->compress(Phar::GZ);
|
||||
unlink($tar_destination);
|
||||
rename("{$tar_destination}.gz", $tgz_destination);
|
||||
if (Phar::canWrite()) {
|
||||
$phar_destination = "{$destPath}{$name}.phar";
|
||||
@unlink($phar_destination);
|
||||
$tar = new Phar($phar_destination);
|
||||
$tar->buildFromDirectory("./plugins/{$name}/");
|
||||
$tar->compress(Phar::GZ);
|
||||
unlink($phar_destination);
|
||||
rename("{$phar_destination}.gz", $phar_destination);
|
||||
}
|
||||
} else {
|
||||
echo "- {$name} {$version}\n";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue