Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

adding a simpler script for making the phar file

  • Loading branch information...
commit 1a00a19d6794a46f81958815c206c3bf75b6ee67 1 parent 0b4ab38
Jonthan Moss authored
Showing with 21 additions and 0 deletions.
  1. +21 −0 make_phar.php
View
21 make_phar.php
@@ -0,0 +1,21 @@
+<?php
+$filename = 'Morph.phar';
+$base_dir = dirname(__FILE__);
+$src_dir = $base_dir . DIRECTORY_SEPARATOR . 'src' . DIRECTORY_SEPARATOR . 'morph' . DIRECTORY_SEPARATOR;
+$metadata = array(
+ 'Author' => 'Jonathan Moss <xirisr@gmail.com>',
+ 'Decription' => 'The Morph package provides a high level framework for working with MongoDB',
+ 'Copyright' => 'Jonathan Moss (c) 2008-' . date('Y'),
+ 'Build' => time(),
+ 'Created Date' => date('Y-m-d H:I:S'),
+);
+
+if (file_exists($filename)) {
+ unlink($filename);
+}
+
+$phar = new Phar($filename, 0, 'Morph');
+
+$phar->buildFromDirectory($src_dir);
+$phar->setStub(file_get_contents($src_dir . '..' . DIRECTORY_SEPARATOR . 'bootstrap.php'));
+$phar->setMetadata($metadata);
Please sign in to comment.
Something went wrong with that request. Please try again.