Browse files

Merge pull request #35 from jimbojsb/phar

Add Phar support.
  • Loading branch information...
2 parents 5b38924 + 1820dca commit 9bff1f2ec29581aacbca8c91e49f431d58287636 @pda committed Feb 2, 2012
Showing with 17 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +15 −0 makephar.php
View
2 .gitignore
@@ -0,0 +1,2 @@
+pheanstalk.phar
+.idea
View
15 makephar.php
@@ -0,0 +1,15 @@
+<?php
+ @unlink(__DIR__ . 'pheanstalk.phar');
+
+ $phar = new Phar(__DIR__ . '/pheanstalk.phar');
+ $phar->buildFromDirectory(__DIR__ . '/classes');
+
+ $bootstrapFile = file_get_contents(__DIR__ . '/pheanstalk_init.php');
+ $bootstrapFile = str_replace('<?php', '', $bootstrapFile);
+
+ $stub .= "<?php" . PHP_EOL;
+ $stub .= "Phar::mapPhar();" . PHP_EOL;
+ $stub .= $bootstrapFile . PHP_EOL;
+ $stub .= "__HALT_COMPILER();" . PHP_EOL;
+ $phar->setStub($stub);
+?>

0 comments on commit 9bff1f2

Please sign in to comment.