svn: /pear/pearweb/trunk/cron/ apidoc-fix-latest.php
| From: | Brett Bieber | Date: | Thu, 28 Jan 2010 22:15:07 +0000 |
| Subject: | svn: /pear/pearweb/trunk/cron/ apidoc-fix-latest.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-core+get-9173@lists.php.net to get a copy of this message | ||
saltybeagle Thu, 28 Jan 2010 22:15:07 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=294166
Log:
Re-link the -latest apidoc symlink if the realpath is not correct.
Changed paths:
U pear/pearweb/trunk/cron/apidoc-fix-latest.php
Modified: pear/pearweb/trunk/cron/apidoc-fix-latest.php
===================================================================
--- pear/pearweb/trunk/cron/apidoc-fix-latest.php 2010-01-28 21:58:00 UTC (rev 294165)
+++ pear/pearweb/trunk/cron/apidoc-fix-latest.php 2010-01-28 22:15:07 UTC (rev 294166)
@@ -58,9 +58,15 @@
//check if apidoc of current version exists
if (file_exists($latestdir)) {
- 'ok: ' . $latestdir . ' -> ' . $dir . "\n";
- ++$ok;
- continue;
+ if (realpath($latestdir) != $dir) {
+ //latest is not correctly symlinked
+ echo 'Unlinking incorrectly linked ' . $latestdir . ' -> ' .
realpath($latestdir) . "\n";
+ unlink($latestdir);
+ } else {
+ 'ok: ' . $latestdir . ' -> ' . $dir . "\n";
+ ++$ok;
+ continue;
+ }
}
if (!file_exists($dir)) {
echo 'No apidoc for current version: ' . $dir . "\n";