Last active
January 21, 2016 01:45
-
-
Save tomzx/db75e50b219cb7fd69c0 to your computer and use it in GitHub Desktop.
Melody bootstrapper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
<<<CONFIG | |
packages: | |
- "your/dependencies: 1.0" | |
CONFIG; | |
if ( ! file_exists('composer.phar')) { | |
file_put_contents('composer.phar', fopen('https://getcomposer.org/composer.phar', 'r')); | |
} | |
if ( ! file_exists('melody.phar')) { | |
file_put_contents('melody.phar', fopen('http://get.sensiolabs.org/melody.phar', 'r')); | |
} | |
if ( ! getenv('MELODY')) { | |
putenv('MELODY=1'); | |
passthru('php '.APP_DIR.'/melody.phar run '.__FILE__.' -vvv'); | |
exit; | |
} | |
// Your PHP code here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment