From 792ab335f659024afc62057b0796d09faf7e173b Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Sun, 22 Nov 2020 20:27:42 +0000 Subject: Handle automatically swtiching autobuild between architectures --- autobuild/results.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/autobuild/results.php b/autobuild/results.php index ad471cf..29f988b 100644 --- a/autobuild/results.php +++ b/autobuild/results.php @@ -31,8 +31,15 @@ while (false !== ($entry = readdir($handle))) { closedir($handle); sort($runs); -# TODO: glob on arch and take most recent -$latest = readlink("cauldron/x86_64/core/latest"); +$latestlinks = array_values(glob("cauldron/*/core/latest")); +$latest = 0; +foreach ($latestlinks as $link) { + $date = readlink($link); + if ($date > $latest) { + $latest = $date; + } +} + $run = $_GET['run']; if (!$run) { $run = $latest; -- cgit v1.2.1