Builds taking longer than a day to run

Joe Marcus Clarke marcus at marcuscom.com
Thu Jul 31 02:10:03 EDT 2008


On Wed, 2008-07-30 at 22:09 -0700, Ade Lovett wrote:
> On Jul 30, 2008, at 17:30 , Joe Marcus Clarke wrote:
> > What about doing this with expr:
> >
> > timediff=$((${end} - ${start}))
> > days=0
> > if [ ${timediff} -ge 86400 ]; then
> >    days=$((${timediff} / 86400))
> > fi
> > echo "phase ${num} took ${days} days $(env LANG=C date -u -j -r
> > ${timediff}) | awk '{print $4}'
> 
> Slightly cleaner version (pet peeve "1 days"):
> 
> echo -n "phase ${num} took "
> duration=$((${end} - ${start}))
> days=$((${duration} / 86400))
> case ${days} in
>      0)	;;
>      1)  echo -n "1 day ";;
>      *)  echo -n "${days} days ";;
> esac
> echo "$(env LANG=C date -u -j -r ${duration} | awk '{print $4}')"

Looks okay to me.

Joe

-- 
PGP Key : http://www.marcuscom.com/pgp.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://marcuscom.com/pipermail/tinderbox-list/attachments/20080731/3d96f513/attachment.bin>


More information about the tinderbox-list mailing list