From 5d5a08667bdb0d04fc3562f36e8baf04f22f8346 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Wed, 7 Sep 2016 21:49:21 +0200 Subject: [PATCH] phar build script --- .gitignore | 4 +++ build.xml | 74 +++++++++++++++++++++++++++++++++++++++++++++++ src/phar-stub.php | 28 ++++++++++++++++++ 3 files changed, 106 insertions(+) create mode 100644 .gitignore create mode 100644 build.xml create mode 100644 src/phar-stub.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6b2102d --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/dist/ +/lib/ +/bin/phar-shpub.php +/README.html diff --git a/build.xml b/build.xml new file mode 100644 index 0000000..6f0ed5c --- /dev/null +++ b/build.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/phar-stub.php b/src/phar-stub.php new file mode 100644 index 0000000..3b09dd9 --- /dev/null +++ b/src/phar-stub.php @@ -0,0 +1,28 @@ +#!/usr/bin/env php + + * @copyright 2016 Christian Weiske + * @license http://www.gnu.org/licenses/agpl.html GNU AGPL v3 + * @link http://cweiske.de/shpub.htm + */ +if (!in_array('phar', stream_get_wrappers()) || !class_exists('Phar', false)) { + echo "Phar extension not avaiable\n"; + exit(255); +} + +//Phar::interceptFileFuncs(); +set_include_path( + 'phar://' . __FILE__ + . PATH_SEPARATOR . 'phar://' . __FILE__ . '/lib/' +); + +require 'phar://' . __FILE__ . '/bin/phar-shpub.php'; +__HALT_COMPILER(); +?> -- 2.30.2