You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/12/06 02:12:23 UTC

svn commit: r601593 - /incubator/stdcxx/trunk/bin/xbuildgen

Author: sebor
Date: Wed Dec  5 17:12:22 2007
New Revision: 601593

URL: http://svn.apache.org/viewvc?rev=601593&view=rev
Log:
2007-12-05  Martin Sebor  <se...@roguewave.com>

	* bin/xbuildgen: Invoked the new duration script to compute
	the age of each build (in days, hours, minutes, or seconds,
	whichever is the most significant) and added it to the top
	table.

Modified:
    incubator/stdcxx/trunk/bin/xbuildgen

Modified: incubator/stdcxx/trunk/bin/xbuildgen
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/bin/xbuildgen?rev=601593&r1=601592&r2=601593&view=diff
==============================================================================
--- incubator/stdcxx/trunk/bin/xbuildgen (original)
+++ incubator/stdcxx/trunk/bin/xbuildgen Wed Dec  5 17:12:22 2007
@@ -69,6 +69,8 @@
 # set program name (used in diagnostic messages)
 myname=`basename $0`
 
+today=`LC_ALL="C" date`
+
 # URL to the ViewVC directory
 viewvc="http://svn.apache.org/viewvc"
 
@@ -406,7 +408,7 @@
   <body>
 
     <h1>Multi-platform Test Result View</h1>
-    Generated `date` on `hostname` running `uname -sr`
+    Generated $today on `hostname` running `uname -sr`
     <hr>
 
     <h2>Index</h2>
@@ -454,6 +456,7 @@
         <th><div title="">###</div></th>
         <th>build<br>type</th>
         <th>build date</th>
+        <th>age</th>
         <th>revision</th>
         <th>build log</th>
         <th>library<br>(bytes)</th>
@@ -507,6 +510,12 @@
     if [ $? -ne 0 ]; then
         echo "$myname: warning: unable to extract date from $l" >&2
         date="(unknown)"
+    else
+        # compute the age of the build as the difference between
+        # the build date and now in days, or hours, or minutes,
+        # or just seconds, whichever happens to be the most
+        # significant
+        age=`$HOME/bin/duration "$date" "$today"`
     fi
 
     # strip the year from the date
@@ -575,6 +584,7 @@
         output "          <td>$n</td>"
         output "          <td>$buildtype</td>"
         output "          <td>$date</td>"
+        output "          <td>$age</td>"
         output "          <td><a href=$revurl=$revno>$revno</a></td>"
         output "          <td><a href=\"$logdir/$fname\">$fname</a></td>"
         output "          <td>$libsize</td>"