Fossil

Check-in [50e953a8]
Login

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

Overview
Comment:Added the mkdownload.tcl script for generating the download.html page.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 50e953a8101012616d5c7880f3643a9e4e760c17
User & Date: drh 2008-03-17 21:14:26.000
Context
2008-03-17
21:21
Update the website to include links to the download page. ... (check-in: bbbee5fc user: drh tags: trunk)
21:14
Added the mkdownload.tcl script for generating the download.html page. ... (check-in: 50e953a8 user: drh tags: trunk)
2008-03-14
12:43
Fix an assertion fault: detect when content_get() is called with an invalid artifact id and return 0. ... (check-in: 4e2bd385 user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Added www/mkdownload.tcl.


































































































































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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
#!/usr/bin/tclsh
#
# Run this script to build the "download" page on standard output.
#
#
puts \
{<html>
<head>
<title>Fossil Download</title>
</head>
<body>
<h1>Fossil Download</h1>

<p>
This page contains prebuilt binaries for 
<a href="index.html">fossil</a> for various architectures.
The source code is available in the
<a href="http://www.fossil-scm.org/fossil/timeline">self-hosting
fossil repository</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 -- {-([a-f0-9]{10})[^a-f0-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-*.gz {
  Prebuilt fossil binary version [VERSION] for Linux on x86
}
Product fossil-maxosx-x86-*.gz {
  Prebuilt fossil binary version [VERSION] for MacOSX on x86
}
Product fossil-w32-*.zip {
  Prebuilt fossil binary version [VERSION] for windows
}


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