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;
|
exit;
|
||||||
}
|
}
|
||||||
if (count($matches) > 0 && $update) { // update yeswiki list
|
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';
|
$tmpFile = '/tmp/yeswiki.zip';
|
||||||
$destDir = '/tmp/yeswiki_for_update';
|
$destDir = '/tmp/yeswiki_for_update';
|
||||||
exec('rm -rf ' . $destDir . ' && mkdir -p ' . $destDir, $output);
|
exec('rm -rf ' . $destDir . ' && mkdir -p ' . $destDir, $output);
|
||||||
|
@ -88,12 +88,15 @@ if ($isRoot) {
|
||||||
unlink($tmpFile);
|
unlink($tmpFile);
|
||||||
// get latest yeswiki version
|
// 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/\""));
|
$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) {
|
foreach ($matches as $k => $wiki) {
|
||||||
|
$nb = $nb + 1;
|
||||||
if ($wiki['VERSION'] != 'doryphore') {
|
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) {
|
} elseif ($wiki['RELEASE'] == $version) {
|
||||||
$climate->info('Skipping up-to-date wiki '.$wiki['URL']);
|
$climate->info($nb.' - skipping up-to-date wiki '.$wiki['URL']);
|
||||||
} else {
|
} else {
|
||||||
|
$climate->info($nb.' - upgrading wiki '.$wiki['URL']);
|
||||||
$climate->info(upgradeWiki($destDir, $wiki['PATH'], $nobackup));
|
$climate->info(upgradeWiki($destDir, $wiki['PATH'], $nobackup));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue