diff options
author | 2018-07-13 10:41:07 -0400 | |
---|---|---|
committer | 2018-07-13 10:41:07 -0400 | |
commit | 29c300918339a74463b24c5c9ed517286675ddf2 (patch) | |
tree | 504e090c2c76cf68ae1e65fb12dd9fe388593a65 | |
parent | Update links and use https where appropriate. (diff) | |
download | planet-29c300918339a74463b24c5c9ed517286675ddf2.tar.gz planet-29c300918339a74463b24c5c9ed517286675ddf2.tar.bz2 planet-29c300918339a74463b24c5c9ed517286675ddf2.zip |
Fix archives by generating a static HTML file
-rw-r--r-- | archives/planet/index.php | 4 | ||||
-rw-r--r-- | archives/universe/index.php | 4 | ||||
-rwxr-xr-x | scripts/update-venus | 6 |
3 files changed, 10 insertions, 4 deletions
diff --git a/archives/planet/index.php b/archives/planet/index.php index fd861b9..0b75d30 100644 --- a/archives/planet/index.php +++ b/archives/planet/index.php @@ -62,7 +62,7 @@ $scandir = scandir('./', 1); echo "<ul>"; foreach ($scandir as $curdir) { - if ( $curdir == "index.php" || $curdir == ".." || $curdir == "." ) continue; + if ( substr($curdir,0,5) == "index" || $curdir == ".." || $curdir == "." ) continue; $cscan = scandir('./' . $curdir, 1); foreach($cscan as $filename) { if ( $filename == "." || $filename == ".." ) continue; @@ -76,7 +76,7 @@ <tr><td colspan="2" class="footer"> -Gentoo Design, Copyright 2001-2011 Gentoo Foundation, Inc.<br> +Gentoo Design, Copyright 2001-2018 Gentoo Foundation, Inc.<br> Views expressed in the content shown above do not necessarily represent the views of Gentoo Linux or the Gentoo Foundation. </td></tr> </tbody></table></body></html> diff --git a/archives/universe/index.php b/archives/universe/index.php index d62398a..5e1ed42 100644 --- a/archives/universe/index.php +++ b/archives/universe/index.php @@ -62,7 +62,7 @@ $scandir = scandir('./', 1); echo "<ul>"; foreach ($scandir as $curdir) { - if ( $curdir == "index.php" || $curdir == ".." || $curdir == "." ) continue; + if ( substr($curdir,0,5) == "index" || $curdir == ".." || $curdir == "." ) continue; $cscan = scandir('./' . $curdir, 1); foreach($cscan as $filename) { if ( $filename == "." || $filename == ".." ) continue; @@ -76,7 +76,7 @@ <tr><td colspan="2" class="footer"> -Gentoo Design, Copyright 2001-2011 Gentoo Foundation, Inc.<br> +Gentoo Design, Copyright 2001-2018 Gentoo Foundation, Inc.<br> Views expressed in the content shown above do not necessarily represent the views of Gentoo Linux or the Gentoo Foundation. </td></tr> </tbody></table></body></html> diff --git a/scripts/update-venus b/scripts/update-venus index faa7f4e..08f05ee 100755 --- a/scripts/update-venus +++ b/scripts/update-venus @@ -48,3 +48,9 @@ cp -a ${BASE_DIR}/htdocs/index.html \ ${BASE_DIR}/htdocs/archives/$(date +%G)/${DATE}.html cp -a ${BASE_DIR}/htdocs/universe/index.html \ ${BASE_DIR}/htdocs/universe/archives/$(date +%G)/${DATE}.html +cd ${BASE_DIR}/htdocs/archives +php index.php > index.html.gen +[[ $? == 0 ]] && mv index.html.gen index.html +cd ${BASE_DIR}/htdocs/universe/archives +php index.php > index.html.gen +[[ $? == 0 ]] && mv index.html.gen index.html |