#!/usr/bin/env php . */ if (!isset($argv[3])) { echo 'Usage: '.$argv[0].' inputDir output.phar ref'.PHP_EOL; die(1); } @unlink($argv[2]); $p = new Phar(__DIR__.'/'.$argv[2], 0, $argv[2]); $p->buildFromDirectory(realpath($argv[1]), '/^((?!tests).)*(\.php|\.py|\.tl|\.json)$/i'); $p->addFromString('vendor/danog/madelineproto/.git/refs/heads/master', $argv[3]); $p->addFromString('.git/refs/heads/master', $argv[3]); $p->setStub('getContent() !== file_get_contents("https://phar.madelineproto.xyz/release?v=new") && !isset($phar_debug)) { file_put_contents(__FILE__, file_get_contents("https://phar.madelineproto.xyz/madeline.phar?v=new")); } Phar::interceptFileFuncs(); Phar::mapPhar("'.$argv[2].'"); require_once "phar://'.$argv[2].'/vendor/autoload.php"; __HALT_COMPILER(); ?>');