Exemplo n.º 1
0
<?php

$topdir = "../../..";
include_once "{$topdir}/software/ompi/v1.0/version.inc";
$title = "Open MPI: Version {$ver_v1_0}";
include_once "{$topdir}/software/ompi/nav.inc";
include_once "{$topdir}/includes/header.inc";
include_once "{$topdir}/includes/downloads.inc";
$md5 = read_checksums("downloads/md5sums.txt");
$sha1 = read_checksums("downloads/sha1sums.txt");
#############################################################################
$t = new downloadTable("./downloads", "./downloads", dirname($_SERVER["PHP_SELF"]));
$src = "v{$ver_v1_0} (stable) source code (<a href=\"srpm.php\">SRPM notes</a>)";
$name = "openmpi-{$ver_v1_0}.tar";
$t->addFile($src, "{$name}.bz2", $md5["{$name}.bz2"], $sha1["{$name}.bz2"]);
$t->addFile($src, "{$name}.gz", $md5["{$name}.gz"], $sha1["{$name}.gz"]);
$name = "openmpi-{$ver_v1_0}-1.src.rpm";
$t->addFile($src, $name, $md5[$name], $sha1[$name]);
# No release candidates at the moment
#$s = "v1.0.2 (pending) alpha";
#$fp = fopen("downloads/latest_snapshot.txt", "r");
#$v = fgets($fp);
#fclose($fp);
#$v = substr($v, 0, strlen($v) - 1);
#
#$t->addFile($s, "openmpi-$v.tar.bz2",
#            $md5["openmpi-$v.tar.bz2"],
#            $sha1["openmpi-$v.tar.bz2"]);
#$t->addFile($s, "openmpi-$v.tar.gz",
#            $md5["openmpi-$v.tar.gz"],
#            $sha1["openmpi-$v.tar.gz"]);
Exemplo n.º 2
0
if (!$f) {
    print "<p>No nightly tarballs available.</p>\n";
} else {
    $latest = trim(fgets($f, 4096));
    fclose($f);
    ?>

<p>Latest snapshot version: <strong><?php 
    print $latest;
    ?>
</strong></p>

<div align=center>
<?php 
    $md5 = read_checksums("md5sums.txt");
    $sha1 = read_checksums("sha1sums.txt");
    $t = new downloadTable($dir, ".");
    uksort($md5, callback);
    uksort($sha1, callback);
    foreach ($md5 as $file => $md5sum) {
        if ($file) {
            $t->addFile("Nightly snapshot", $file, $md5sum, $sha1[$file]);
        }
    }
    $t->printMe();
    print "</div>\n\n";
}
# Do a reverse comparison so that we get the highest numbered tarball
# first.  Parse out the git sequence number and sort numerically (not
# lexigraphically).
function callback($a, $b)