standalone/fetchupd.php

32 lines
920 B
PHP
Raw Permalink Normal View History

2019-04-12 15:40:27 +02:00
<?php
$arch = isset($argv[1]) ? $argv[1] : 'amd64';
$ring = isset($argv[2]) ? $argv[2] : 'WIF';
$flight = isset($argv[3]) ? $argv[3] : 'Active';
$build = isset($argv[4]) ? $argv[4] : 16251;
2019-04-12 15:40:27 +02:00
$minor = isset($argv[5]) ? intval($argv[5]) : 0;
$sku = isset($argv[6]) ? intval($argv[6]) : 48;
2021-02-06 14:28:40 +01:00
$type = isset($argv[7]) ? $argv[7] : 'Production';
2019-04-12 15:40:27 +02:00
require_once dirname(__FILE__).'/api/fetchupd.php';
require_once dirname(__FILE__).'/shared/main.php';
consoleLogger(brand('fetchupd'));
2021-02-06 14:28:40 +01:00
$fetchedUpdate = uupFetchUpd($arch, $ring, $flight, $build, $minor, $sku, $type);
2019-04-12 15:40:27 +02:00
if(isset($fetchedUpdate['error'])) {
throwError($fetchedUpdate['error']);
}
foreach($fetchedUpdate['updateArray'] as $update) {
echo $update['foundBuild'];
echo '|';
echo $update['arch'];
echo '|';
echo $update['updateId'];
echo '|';
echo $update['updateTitle'];
echo '|';
echo $update['fileWrite'];
echo "\n";
}
2019-04-12 15:40:27 +02:00
?>