Fossil

Check-in [52994190]
Login

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

Overview
Comment:Further improvements to the mkdownload.tcl script.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:529941901a25ead52377c06eb092f836c8c2bbae
User & Date: drh 2016-10-24 17:57:54
Context
2016-10-24
18:15
Fix the build on MSVC. check-in: 65e69b8d user: drh tags: trunk
17:57
Further improvements to the mkdownload.tcl script. check-in: 52994190 user: drh tags: trunk
17:03
Add fragment anchors in the changes.wiki page. Update the mkdownload.tcl script so that it works with the new unversioned-file download. check-in: d0c77c7c user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to www/mkdownload.tcl.

58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
  }
  puts $out "</b></center>"
  puts $out "</td></tr>"
  puts $out "<tr>"

  foreach {prefix img desc} {
    fossil-linux-x86 linux.gif {Linux 3.x x86}
    fossil-macosx-x86 mac.gif {Mac 10.x x86}
    fossil-openbsd-x86 openbsd.gif {OpenBSD 5.x x86}
    fossil-w32 win32.gif {Windows}
    fossil-src src.gif {Source Tarball}
  } {
    set basename download/$prefix-$vers
    set filename $basename.tar.gz
    if {![info exists filesize($basename.tar.gz)]} {
      set filename $basename.zip
    }
    if {[info exists filesize($filename)]} {
      set size [set filesize($filename)]
      set units bytes
      if {$size>1024*1024} {
        set size [format %.2f [expr {$size/(1024.0*1024.0)}]]
        set units MiB
      } elseif {$size>1024} {







|




|
<
<
|
<







58
59
60
61
62
63
64
65
66
67
68
69
70


71

72
73
74
75
76
77
78
  }
  puts $out "</b></center>"
  puts $out "</td></tr>"
  puts $out "<tr>"

  foreach {prefix img desc} {
    fossil-linux-x86 linux.gif {Linux 3.x x86}
    fossil-macosx mac.gif {Mac 10.x x86}
    fossil-openbsd-x86 openbsd.gif {OpenBSD 5.x x86}
    fossil-w32 win32.gif {Windows}
    fossil-src src.gif {Source Tarball}
  } {
    set glob download/$prefix*-$vers*


    set filename [array names filesize $glob]

    if {[info exists filesize($filename)]} {
      set size [set filesize($filename)]
      set units bytes
      if {$size>1024*1024} {
        set size [format %.2f [expr {$size/(1024.0*1024.0)}]]
        set units MiB
      } elseif {$size>1024} {