diff --git a/README.md b/README.md index 13d9f51..f72fc2c 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,18 @@ You can view the [Full Documentation](docs/util.md) to lean more about what this ### Installation +__Using .phar library__ + +```sh +wget https://github.com/IMPHP/util/releases/download//imphp-util.phar +``` + +```php +require "imphp-util.phar"; + +... +``` + __Clone via git__ ```sh diff --git a/make.php b/make.php new file mode 100644 index 0000000..2dbbc30 --- /dev/null +++ b/make.php @@ -0,0 +1,101 @@ +#!/usr/bin/env php +addFile($file, $local_file); + } +} + +print " - Adding stub files\n"; +if (is_file("static.php")) { + if (is_file("version")) { + $phar->addFile("version", "version"); + } + + $phar->addFile("static.php", "static.php"); +} +$phar->addFile("stub.php", "stub.php"); + +/* ========================== + * Configure default stub + */ +print "Configuring default stub\n"; +$phar->startBuffering(); // Allows us to modify the stub content +$phar->setStub( + $phar->createDefaultStub("stub.php") +); +$phar->stopBuffering(); + +print "Done!\n"; diff --git a/stub.php b/stub.php new file mode 100644 index 0000000..1e29a07 --- /dev/null +++ b/stub.php @@ -0,0 +1,10 @@ +addBasePath(__DIR__);