From fb89e1265c288b619f04c0f6c06193c8e1a0a46d Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Thu, 6 Dec 2007 20:04:26 +0000 Subject: =?UTF-8?q?=C3=85ngstr=C3=B6m=20autobuilder:=20new=20RSS=20generat?= =?UTF-8?q?or?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contrib/angstrom/build-release.sh | 2 +- contrib/angstrom/rss.php | 57 +++++++++++++++++++---------------- contrib/angstrom/rss2.php | 63 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 95 insertions(+), 27 deletions(-) create mode 100644 contrib/angstrom/rss2.php diff --git a/contrib/angstrom/build-release.sh b/contrib/angstrom/build-release.sh index e487669e0d..7ba5f8bf3b 100755 --- a/contrib/angstrom/build-release.sh +++ b/contrib/angstrom/build-release.sh @@ -29,7 +29,7 @@ do_build() { do_report_success() { - echo "$(date -u +%Y%M%d%H%M) $target ($BUILD_MODE) built for $machine" >> autobuilder.log + echo "$(date -u +%s) $target $BUILD_MODE $machine" >> autobuilder.log } # No graphics diff --git a/contrib/angstrom/rss.php b/contrib/angstrom/rss.php index 8970ba1797..cf5a9e0218 100644 --- a/contrib/angstrom/rss.php +++ b/contrib/angstrom/rss.php @@ -1,43 +1,48 @@ -');?> +'); ?> - - Ångstrom autobuilder updates - http://www.angstrom-distribution.org/unstable/autobuild - - en + + Ångström autobuilder updates + http://www.angstrom-distribution.org/unstable/autobuild/ + + en \n"); -print("$file/$file2 uploaded\n"); -print(" http://www.angstrom-distribution.org/unstable/autobuild/$file/$file2\n"); + while (false !== ($file2 = readdir($second_handle))) + { + if(is_file("/$base_path/$file/$file2")) + { + $fmtime = filemtime("$file/$file2"); -$rsstime = strftime("%a, %d %b %Y %T +0100", $fmtime); + echo "\n" + echo "$file/$file2 uploaded\n"; + echo " http://www.angstrom-distribution.org/unstable/autobuild/$file/$file2\n"; -print("$rsstime\n"); -print("Angstrom autobuilder"); -print("\n"); + $rsstime = strftime("%a, %d %b %Y %T +0100", $fmtime); - } + echo "$rsstime\n"; + echo "Angstrom autobuilder"; + echo "\n"; } - closedir($second_handle); - } + } + closedir($second_handle); } + closedir($handle); } ?> - + - - diff --git a/contrib/angstrom/rss2.php b/contrib/angstrom/rss2.php new file mode 100644 index 0000000000..995c344e14 --- /dev/null +++ b/contrib/angstrom/rss2.php @@ -0,0 +1,63 @@ +openMemory(); + +$rss_xml->startDocument('1.0','utf-8'); +$rss_xml->startElement('rss'); +$rss_xml->writeAttribute('version', '2.0'); + +$rss_xml->startElement('channel'); + +$rss_xml->writeElement('title', 'Ångström autobuilder updates'); +$rss_xml->writeElement('link', $build_link_base); +$rss_xml->writeElement('description', 'Ångström autobuilder updates list'); + +foreach($builder_log_date as $build) +{ + $build = str_replace("\n", "", $build); + $data = explode(' ', $build); + + $rss_xml->startElement('item'); + $rss_xml->writeElement('title', "{$data[1]} ({$data[2]}) built for {$data[3]}"); + $rss_xml->writeElement('link', "{$build_link_base}{$data[3]}/"); + $rss_xml->writeElement('pubDate', date('r', $data[0])); + + $rss_xml->endElement(); +} + +$rss_xml->endElement(); +$rss_xml->endElement(); + +echo $rss_xml->outputMemory(true); + +echo "\n"; +?> -- cgit v1.2.3