'Mark Baker ', 'Description' => 'A pure PHP library for reading and writing spreadsheet files', 'Copyright' => 'Mark Baker (c) 2006-' . date('Y'), 'Timestamp' => time(), 'Version' => '##VERSION##', 'Date' => '##DATE##' ); // cleanup if (file_exists($pharName)) { echo "Removed: {$pharName}\n"; unlink($pharName); } echo "Building...\n"; // the phar object $phar = new Phar($pharName, null, 'PHPExcel'); $phar->buildFromDirectory($sourceDir); $phar->setStub( <<<'EOT' getMessage()); exit(1); } __HALT_COMPILER(); EOT ); $phar->setMetadata($metaData); $phar->compressFiles(Phar::GZ); echo "Complete.\n"; exit();