Fossil

Check-in [10989b5c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updates to the website download page generator script.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 10989b5c427ce121d404574c37e4d78f74a046c3
User & Date: drh 2010-03-06 19:21:10
References
2010-03-08
07:41 New ticket [46241f6a] password prompt problem in bash from MSYS on Windows NT. artifact: 2f5ab115 user: anonymous
Context
2010-03-06
19:35
Refinements to the formatting of the download page. check-in: 9405e691 user: drh tags: trunk
19:21
Updates to the website download page generator script. check-in: 10989b5c user: drh tags: trunk
16:41
Allow specifying tags using TAG:DATE. The result is the newest check-in with TAG that occurs or before DATE. check-in: 337a1aca user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added www/build-icons/linux.gif.

cannot compute difference between binary files

Added www/build-icons/linux64.gif.

cannot compute difference between binary files

Added www/build-icons/mac.gif.

cannot compute difference between binary files

Added www/build-icons/src.gif.

cannot compute difference between binary files

Added www/build-icons/win32.gif.

cannot compute difference between binary files

Changes to www/mkdownload.tcl.

25
26
27
28
29
30
31
32
33
34
35

36
37
38
39
40
41
























42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57





58
59

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

76
77
78
79
80
Click on links below to download prebuilt binaries and source tarballs for 
recent versions of <a href="/fossil">Fossil</a>.
The historical source code is also available in the
<a href="/fossil/doc/tip/www/selfhost.wiki">self-hosting
Fossil repositories</a>.
</p>

<table cellpadding="5">
}

proc Product {pattern desc} {

  set flist [glob -nocomplain download/$pattern]
  foreach file [lsort -dict $flist] {
    set file [file tail $file]
    if {![regexp -- {-([0-9]+)\.} $file all version]} continue
    set mtime [file mtime download/$file]
    set date [clock format $mtime -format {%Y-%m-%d %H:%M:%S UTC} -gmt 1]
























    set size [file size download/$file]
    set units bytes
    if {$size>1024*1024} {
      set size [format %.2f [expr {$size/(1024.0*1024.0)}]]
      set units MiB
    } elseif {$size>1024} {
      set size [format %.2f [expr {$size/(1024.0)}]]
      set units KiB
    }
    puts "<tr><td width=\"10\"></td>"
    puts "<td valign=\"top\" align=\"right\">"
    puts "<a href=\"download/$file\">$file</a></td>"
    puts "<td width=\"5\"></td>"
    regsub -all VERSION $desc $version d2
    puts "<td valign=\"top\">[string trim $d2].<br>Size: $size $units.<br>"
    puts "Created: $date</td></tr>"





  }
}


Product fossil-linux-x86-*.zip {
  Prebuilt fossil binary version [VERSION] for Linux on x86
}
Product fossil-linux-amd64-*.zip {
  Prebuilt fossil binary version [VERSION] for Linux on amd64
}
Product fossil-macosx-x86-*.zip {
  Prebuilt fossil binary version [VERSION] for MacOSX on x86
}
Product fossil-w32-*.zip {
  Prebuilt fossil binary version [VERSION] for windows
}
Product fossil-src-*.tar.gz {
  Source code tarball for fossil version [VERSION]
}


puts {</table>
</body>
</html>
}







|


|
>
|
<
|
|
|
<
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
<
<
<
<
<
<
<
>
>
>
>
>
|
|
>
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
>





25
26
27
28
29
30
31
32
33
34
35
36
37

38
39
40

41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73







74
75
76
77
78
79
80
81
82















83
84
85
86
87
88
Click on links below to download prebuilt binaries and source tarballs for 
recent versions of <a href="/fossil">Fossil</a>.
The historical source code is also available in the
<a href="/fossil/doc/tip/www/selfhost.wiki">self-hosting
Fossil repositories</a>.
</p>

<table cellpadding="10">
}

# Find all all unique timestamps.
#
foreach file [glob -nocomplain download/fossil-*.zip] {

  if {[regexp {(\d+).zip$} $file all datetime]
       && [string length $datetime]==14} {
    set adate($datetime) 1

  }
}

# Do all dates from newest to oldest
#
foreach datetime [lsort -decr [array names adate]] {
  puts "<tr><td colspan=7><hr></td></tr>"
  set dt [string range $datetime 0 3]-[string range $datetime 4 5]-
  append dt "[string range $datetime 6 7] "
  append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:"
  append dt "[string range $datetime 12 13]"
  set link [string map {{ } +} $dt]
  set hr http://www.fossil-scm.org/fossil/timeline?c=$link&y=ci
  puts "<tr><td>Fossil snapshot as of <a href=\"$hr\">$dt</a><td width=30>"
  
  foreach {prefix suffix img desc} {
    fossil-linux-x86 zip linux.gif {Linux x86}
    fossil-linux-amd64 zip linux64.gif {Linux x86_64}
    fossil-macosx-x86 zip mac.gif {Mac 10.5 x86}
    fossil-w32 zip win32.gif {Windows}
    fossil-src tar.gz src.gif {Source Tarball}
  } {
    set filename download/$prefix-$datetime.$suffix
    if {[file exists $filename]} {
      set size [file size $filename]
      set units bytes
      if {$size>1024*1024} {
        set size [format %.2f [expr {$size/(1024.0*1024.0)}]]
        set units MiB
      } elseif {$size>1024} {
        set size [format %.2f [expr {$size/(1024.0)}]]
        set units KiB
      }







      puts "<td align=center valign=bottom><a href=\"$filename\">"
      puts "<img src=\"build-icons/$img\" border=0><br>$desc</a><br>"
      puts "$size $units</td>"
    } else {
      puts "<td>&nbsp;</td>"
    }
  }
  puts "</tr>"
}















puts "<tr><td colspan=7><hr></td></tr>"

puts {</table>
</body>
</html>
}