-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update of satis binary due to changes introduced in alpha3 version of…
… satis
- Loading branch information
1 parent
594c22e
commit e8654e2
Showing
1 changed file
with
14 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,28 @@ | ||
#!/usr/bin/env php | ||
|
||
<?php | ||
|
||
require __DIR__.'/../bootstrap/autoload.php'; | ||
require_once __DIR__.'/../bootstrap/app.php'; | ||
require __DIR__ . '/../vendor/composer/satis/src/bootstrap.php'; | ||
|
||
$appConfig = require __DIR__ . '/../config/satis.php'; | ||
|
||
use Composer\Satis\Console\Application; | ||
|
||
/* | ||
foreach(['http', 'https'] as $protocol) { | ||
$proxy = $appConfig['proxy'][$protocol]; | ||
if($proxy !== null) { | ||
putenv(strtoupper($protocol) . '_PROXY=' . $proxy); | ||
putenv(strtolower($protocol) . '_proxy=' . $proxy); | ||
} | ||
}*/ | ||
|
||
putenv('COMPOSER_HOME=' . $appConfig['composer_home']); | ||
putenv('COMPOSER_CACHE_DIR=' . $appConfig['composer_cache']); | ||
|
||
$application = new Application(); | ||
function includeIfExists($file) | ||
{ | ||
if (file_exists($file)) { | ||
return include $file; | ||
} | ||
} | ||
|
||
if ((!$loader = includeIfExists(__DIR__.'/../vendor/autoload.php')) && (!$loader = includeIfExists(__DIR__.'/../../../autoload.php'))) { | ||
print('You must set up the project dependencies using Composer before you can use Satis.'); | ||
exit(1); | ||
} | ||
|
||
$application = new Composer\Satis\Console\Application(); | ||
$application->run(); | ||
|