Fossil

Check-in [fb94a70d]
Login

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

Overview
Comment:Enhance the "mkdownload.tcl" script so that it recognizes either tarballs or ZIP archives, with a preference for tarballs.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fb94a70da422ae91a90116f49ed111c7ef74ea24
User & Date: drh 2015-12-11 20:52:11
Context
2015-12-12
20:01
Eliminate unused variable $suffix check-in: 6d84c632 user: jan.nijtmans tags: trunk
2015-12-11
20:52
Enhance the "mkdownload.tcl" script so that it recognizes either tarballs or ZIP archives, with a preference for tarballs. check-in: fb94a70d user: drh tags: trunk
16:14
Update the built-in SQLite to the latest trunk version (3.10.0 alpha). check-in: 22681034 user: drh tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to www/mkdownload.tcl.

72
73
74
75
76
77
78
79




80
81
82
83
84
85
86
  foreach {prefix suffix img desc} {
    fossil-linux-x86 zip linux.gif {Linux 3.x x86}
    fossil-macosx-x86 zip mac.gif {Mac 10.x x86}
    fossil-openbsd-x86 zip openbsd.gif {OpenBSD 5.x x86}
    fossil-w32 zip win32.gif {Windows}
    fossil-src tar.gz src.gif {Source Tarball}
  } {
    set filename download/$prefix-$vers.$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} {







|
>
>
>
>







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
  foreach {prefix suffix img desc} {
    fossil-linux-x86 zip linux.gif {Linux 3.x x86}
    fossil-macosx-x86 zip mac.gif {Mac 10.x x86}
    fossil-openbsd-x86 zip openbsd.gif {OpenBSD 5.x x86}
    fossil-w32 zip win32.gif {Windows}
    fossil-src tar.gz src.gif {Source Tarball}
  } {
    set basename download/$prefix-$vers
    set filename $basename.tar.gz
    if {![file exists $basename.tar.gz]} {
      set filename $basename.zip
    }
    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} {