A simple script for zsh shell that allows you to quickly generate Phar files from projects placed in a folder with a specific name (app
by default). There should be at least one file inside app
folder called main.php
.
- For convenience of use place both files (
makephar
andmakephar.php
) somewhere in your$PATH
and makemakephar
executable. - Place all required PHP files in the
app
directory and create amain.php
file that calls the actual script (using inculde or require). - In the parent directory execute the
makephar
command. makephar
will generate Phar file calledapp.phar
.