This commit is contained in:
parent
a5c6a74f2b
commit
48ff8144fe
1 changed files with 6 additions and 3 deletions
|
@ -74,7 +74,7 @@ if ($isRoot) {
|
|||
exit;
|
||||
}
|
||||
if (count($matches) > 0 && $update) { // update yeswiki list
|
||||
$climate->info('Update all listed yeswikis');
|
||||
$climate->info('Update all '.count($matches).' yeswikis found');
|
||||
$tmpFile = '/tmp/yeswiki.zip';
|
||||
$destDir = '/tmp/yeswiki_for_update';
|
||||
exec('rm -rf ' . $destDir . ' && mkdir -p ' . $destDir, $output);
|
||||
|
@ -88,12 +88,15 @@ if ($isRoot) {
|
|||
unlink($tmpFile);
|
||||
// get latest yeswiki version
|
||||
$version = trim(cli("cat $destDir/includes/constants.php | grep YESWIKI_RELEASE | sed -r -e \"s/.*([0-9]+\\.[0-9]+\\.[0-9]+).*/\\1/\""));
|
||||
$nb = 0;
|
||||
foreach ($matches as $k => $wiki) {
|
||||
$nb = $nb + 1;
|
||||
if ($wiki['VERSION'] != 'doryphore') {
|
||||
$climate->red('Skipping non doryphore version wiki '.$wiki['URL']);
|
||||
$climate->info($nb.' - skipping non doryphore version wiki '.$wiki['URL']);
|
||||
} elseif ($wiki['RELEASE'] == $version) {
|
||||
$climate->info('Skipping up-to-date wiki '.$wiki['URL']);
|
||||
$climate->info($nb.' - skipping up-to-date wiki '.$wiki['URL']);
|
||||
} else {
|
||||
$climate->info($nb.' - upgrading wiki '.$wiki['URL']);
|
||||
$climate->info(upgradeWiki($destDir, $wiki['PATH'], $nobackup));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue