Enabled self-update of phar

This commit is contained in:
Chris 2017-02-12 02:50:59 +01:00
parent 4873ffdf02
commit 072570ebea

View File

@ -8,5 +8,14 @@ foreach ($loaders as $loader) {
if (file_exists($loader)) { require_once $loader; break; } if (file_exists($loader)) { require_once $loader; break; }
} }
if (count($argv)>1 && $argv[1]=='self-update') {
if (IS_PHAR) {
tinyphar_update(META_PACKAGE_NAME, META_PACKAGE_VERSION, META_UPDATE_CHANNEL);
} else {
printf("Error: You can only self-update phar archives!\n");
}
exit;
}
$app = new MakePhar\Application(); $app = new MakePhar\Application();
$app->run(); $app->run();