Rev | Line | |
---|
[2923] | 1 | <?php |
---|
| 2 | $license_block = <<<EOF |
---|
| 3 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
| 4 | # |
---|
| 5 | # This file is part of Dotclear 2. |
---|
| 6 | # |
---|
| 7 | # Copyright (c) 2003-2015 Association Dotclear |
---|
| 8 | # Licensed under the GPL version 2.0 license. |
---|
| 9 | # See LICENSE file or |
---|
| 10 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
| 11 | # |
---|
| 12 | # -- END LICENSE BLOCK ----------------------------------------- |
---|
| 13 | EOF; |
---|
| 14 | |
---|
| 15 | $dc_base = dirname(__FILE__).'/..'; |
---|
| 16 | $php_exec = $_SERVER['_']; |
---|
| 17 | |
---|
| 18 | $opts = array( |
---|
| 19 | 'http' => array() |
---|
| 20 | ); |
---|
| 21 | if (getenv('http_proxy') !== false) { |
---|
| 22 | $opts['http']['proxy'] = 'tcp://'.getenv('http_proxy'); |
---|
| 23 | } |
---|
| 24 | $context = stream_context_create($opts); |
---|
| 25 | |
---|
| 26 | if (!file_exists($dc_base.'/composer.phar')) { |
---|
| 27 | echo "Downloading composer.phar\n"; |
---|
| 28 | $composer_installer = file_get_contents('https://getcomposer.org/composer.phar',false,$context); |
---|
| 29 | file_put_contents($dc_base.'/composer.phar',$composer_installer); |
---|
| 30 | } |
---|
| 31 | chdir($dc_base); |
---|
[2933] | 32 | echo 'Running '.$php_exec.' composer.phar install'."\n"; |
---|
| 33 | passthru ($php_exec.' composer.phar install'); |
---|
Note: See
TracBrowser
for help on using the repository browser.