50e953a810 2008-03-17 drh: #!/usr/bin/tclsh 50e953a810 2008-03-17 drh: # 50e953a810 2008-03-17 drh: # Run this script to build the "download" page on standard output. 50e953a810 2008-03-17 drh: # 50e953a810 2008-03-17 drh: # 50e953a810 2008-03-17 drh: puts \ 50e953a810 2008-03-17 drh: {<html> 50e953a810 2008-03-17 drh: <head> db70c415ab 2009-09-12 drh: <title>Fossil: Downloads</title> db70c415ab 2009-09-12 drh: <link rel="stylesheet" href="/fossil/style.css" type="text/css" db70c415ab 2009-09-12 drh: media="screen"> 50e953a810 2008-03-17 drh: </head> 50e953a810 2008-03-17 drh: <body> db70c415ab 2009-09-12 drh: <div class="header"> db70c415ab 2009-09-12 drh: <div class="logo"> db70c415ab 2009-09-12 drh: <img src="/fossil/doc/tip/www/fossil_logo_small.gif" alt="logo"> db70c415ab 2009-09-12 drh: </div> db70c415ab 2009-09-12 drh: <div class="title">Fossil Downloads</div> db70c415ab 2009-09-12 drh: </div> db70c415ab 2009-09-12 drh: <div class="mainmenu"><a href='/fossil/doc/tip/www/index.wiki'>Home</a><a href='/fossil/leaves'>Leaves</a><a href='/fossil/timeline'>Timeline</a><a href='/fossil/brlist'>Branches</a><a href='/fossil/taglist'>Tags</a><a href='/fossil/reportlist'>Tickets</a><a href='/fossil/wiki'>Wiki</a><a href='/fossil/login'>Login</a></div> db70c415ab 2009-09-12 drh: <div class="content"> db70c415ab 2009-09-12 drh: <p> 50e953a810 2008-03-17 drh: 50e953a810 2008-03-17 drh: <p> db70c415ab 2009-09-12 drh: Click on links below to download prebuilt binaries and source tarballs for db70c415ab 2009-09-12 drh: recent versions of <a href="/fossil">Fossil</a>. db70c415ab 2009-09-12 drh: The historical source code is also available in the db70c415ab 2009-09-12 drh: <a href="/fossil/doc/tip/www/selfhost.wiki">self-hosting db70c415ab 2009-09-12 drh: Fossil repositories</a>. 50e953a810 2008-03-17 drh: </p> 50e953a810 2008-03-17 drh: 50e953a810 2008-03-17 drh: <table cellpadding="5"> 50e953a810 2008-03-17 drh: } 50e953a810 2008-03-17 drh: 50e953a810 2008-03-17 drh: proc Product {pattern desc} { 50e953a810 2008-03-17 drh: set flist [glob -nocomplain download/$pattern] 50e953a810 2008-03-17 drh: foreach file [lsort -dict $flist] { 50e953a810 2008-03-17 drh: set file [file tail $file] db70c415ab 2009-09-12 drh: if {![regexp -- {-([0-9]+)\.} $file all version]} continue 50e953a810 2008-03-17 drh: set mtime [file mtime download/$file] 50e953a810 2008-03-17 drh: set date [clock format $mtime -format {%Y-%m-%d %H:%M:%S UTC} -gmt 1] 50e953a810 2008-03-17 drh: set size [file size download/$file] 50e953a810 2008-03-17 drh: set units bytes 50e953a810 2008-03-17 drh: if {$size>1024*1024} { 50e953a810 2008-03-17 drh: set size [format %.2f [expr {$size/(1024.0*1024.0)}]] 50e953a810 2008-03-17 drh: set units MiB 50e953a810 2008-03-17 drh: } elseif {$size>1024} { 50e953a810 2008-03-17 drh: set size [format %.2f [expr {$size/(1024.0)}]] 50e953a810 2008-03-17 drh: set units KiB 50e953a810 2008-03-17 drh: } 50e953a810 2008-03-17 drh: puts "<tr><td width=\"10\"></td>" 50e953a810 2008-03-17 drh: puts "<td valign=\"top\" align=\"right\">" 50e953a810 2008-03-17 drh: puts "<a href=\"download/$file\">$file</a></td>" 50e953a810 2008-03-17 drh: puts "<td width=\"5\"></td>" 50e953a810 2008-03-17 drh: regsub -all VERSION $desc $version d2 50e953a810 2008-03-17 drh: puts "<td valign=\"top\">[string trim $d2].<br>Size: $size $units.<br>" 50e953a810 2008-03-17 drh: puts "Created: $date</td></tr>" 50e953a810 2008-03-17 drh: } 50e953a810 2008-03-17 drh: } 50e953a810 2008-03-17 drh: db70c415ab 2009-09-12 drh: Product fossil-linux-x86-*.zip { 50e953a810 2008-03-17 drh: Prebuilt fossil binary version [VERSION] for Linux on x86 50e953a810 2008-03-17 drh: } db70c415ab 2009-09-12 drh: Product fossil-linux-amd64-*.zip { db70c415ab 2009-09-12 drh: Prebuilt fossil binary version [VERSION] for Linux on amd64 db70c415ab 2009-09-12 drh: } db70c415ab 2009-09-12 drh: Product fossil-macosx-x86-*.zip { 50e953a810 2008-03-17 drh: Prebuilt fossil binary version [VERSION] for MacOSX on x86 50e953a810 2008-03-17 drh: } 50e953a810 2008-03-17 drh: Product fossil-w32-*.zip { 50e953a810 2008-03-17 drh: Prebuilt fossil binary version [VERSION] for windows 50e953a810 2008-03-17 drh: } db70c415ab 2009-09-12 drh: Product fossil-src-*.tar.gz { db70c415ab 2009-09-12 drh: Source code tarball for fossil version [VERSION] db70c415ab 2009-09-12 drh: } 50e953a810 2008-03-17 drh: 50e953a810 2008-03-17 drh: puts {</table> 50e953a810 2008-03-17 drh: </body> 50e953a810 2008-03-17 drh: </html> 50e953a810 2008-03-17 drh: }