Dotclear

source: build-tools/setup.php @ 2933:dbaf21d1dbe8

Revision 2933:dbaf21d1dbe8, 1023 bytes checked in by Dsls, 11 years ago (diff)

Use composer install instead of update

Line 
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 -----------------------------------------
13EOF;
14
15$dc_base = dirname(__FILE__).'/..';
16$php_exec = $_SERVER['_'];
17
18$opts = array(
19     'http' => array()
20);
21if (getenv('http_proxy') !== false) {
22     $opts['http']['proxy'] = 'tcp://'.getenv('http_proxy');
23}
24$context = stream_context_create($opts);
25
26if (!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}
31chdir($dc_base);
32echo 'Running '.$php_exec.' composer.phar install'."\n";
33passthru ($php_exec.' composer.phar install');
Note: See TracBrowser for help on using the repository browser.

Sites map