Fossil SCM
Update the download page generator script to also generate a page showing the SHA1 checksums of all build products.
Commit
cea065c7f2709af078ab9a1eff855b2544bedf2e
Parent
655e78209bc8fd3…
1 file changed
+52
-26
+52
-26
| --- www/mkdownload.tcl | ||
| +++ www/mkdownload.tcl | ||
| @@ -1,11 +1,13 @@ | ||
| 1 | 1 | #!/usr/bin/tclsh |
| 2 | 2 | # |
| 3 | -# Run this script to build the "download.html" page on standard output. | |
| 3 | +# Run this script to build the "download.html" page. Also generate | |
| 4 | +# the fossil_download_checksums.html page. | |
| 4 | 5 | # |
| 5 | 6 | # |
| 6 | -puts \ | |
| 7 | +set out [open download.html w] | |
| 8 | +puts $out \ | |
| 7 | 9 | {<html> |
| 8 | 10 | <head> |
| 9 | 11 | <title>Fossil: Downloads</title> |
| 10 | 12 | <link rel="stylesheet" href="/fossil/style.css" type="text/css" |
| 11 | 13 | media="screen"> |
| @@ -22,14 +24,17 @@ | ||
| 22 | 24 | <p> |
| 23 | 25 | |
| 24 | 26 | <center><font size=4> |
| 25 | 27 | <b>To install Fossil →</b> download the stand-alone executable |
| 26 | 28 | and put it on your $PATH. |
| 27 | -</font><p> | |
| 29 | +</font><p><small> | |
| 28 | 30 | RPMs available |
| 29 | 31 | <a href="http://download.opensuse.org/repositories/home:/rmax:/fossil/"> |
| 30 | -here</a> | |
| 32 | +here.</a> | |
| 33 | +Cryptographic checksums for download files are | |
| 34 | +<a href="http://www.hwaci.com/fossil_download_checksums.html">here</a>. | |
| 35 | +</small></p> | |
| 31 | 36 | </center> |
| 32 | 37 | |
| 33 | 38 | <table cellpadding="10"> |
| 34 | 39 | } |
| 35 | 40 | |
| @@ -49,13 +54,13 @@ | ||
| 49 | 54 | append dt "[string range $datetime 6 7] " |
| 50 | 55 | append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:" |
| 51 | 56 | append dt "[string range $datetime 12 13]" |
| 52 | 57 | set link [string map {{ } +} $dt] |
| 53 | 58 | set hr http://www.fossil-scm.org/fossil/timeline?c=$link&y=ci |
| 54 | - puts "<tr><td colspan=6 align=left><hr>" | |
| 55 | - puts "<center><b><a href=\"$hr\">$dt</a></b></center>" | |
| 56 | - puts "</td></tr>" | |
| 59 | + puts $out "<tr><td colspan=6 align=left><hr>" | |
| 60 | + puts $out "<center><b><a href=\"$hr\">$dt</a></b></center>" | |
| 61 | + puts $out "</td></tr>" | |
| 57 | 62 | |
| 58 | 63 | foreach {prefix suffix img desc} { |
| 59 | 64 | fossil-linux-x86 zip linux.gif {Linux x86} |
| 60 | 65 | fossil-linux-amd64 zip linux64.gif {Linux x86_64} |
| 61 | 66 | fossil-macosx-x86 zip mac.gif {Mac 10.5 x86} |
| @@ -72,27 +77,48 @@ | ||
| 72 | 77 | set units MiB |
| 73 | 78 | } elseif {$size>1024} { |
| 74 | 79 | set size [format %.2f [expr {$size/(1024.0)}]] |
| 75 | 80 | set units KiB |
| 76 | 81 | } |
| 77 | - puts "<td align=center valign=bottom><a href=\"$filename\">" | |
| 78 | - puts "<img src=\"build-icons/$img\" border=0><br>$desc</a><br>" | |
| 79 | - puts "$size $units</td>" | |
| 80 | - } else { | |
| 81 | - puts "<td> </td>" | |
| 82 | - } | |
| 83 | - } | |
| 84 | - puts "</tr>" | |
| 85 | - if {[file exists download/releasenotes-$datetime.html]} { | |
| 86 | - puts "<tr><td colspan=6 align=left>" | |
| 87 | - set rn [open download/releasenotes-$datetime.html] | |
| 88 | - puts "[read $rn]" | |
| 89 | - close $rn | |
| 90 | - puts "</td></tr>" | |
| 91 | - } | |
| 92 | -} | |
| 93 | -puts "<tr><td colspan=5><hr></td></tr>" | |
| 94 | - | |
| 95 | -puts {</table> | |
| 82 | + puts $out "<td align=center valign=bottom><a href=\"$filename\">" | |
| 83 | + puts $out "<img src=\"build-icons/$img\" border=0><br>$desc</a><br>" | |
| 84 | + puts $out "$size $units</td>" | |
| 85 | + } else { | |
| 86 | + puts $out "<td> </td>" | |
| 87 | + } | |
| 88 | + } | |
| 89 | + puts $out "</tr>" | |
| 90 | + if {[file exists download/releasenotes-$datetime.html]} { | |
| 91 | + puts $out "<tr><td colspan=6 align=left>" | |
| 92 | + set rn [open download/releasenotes-$datetime.html] | |
| 93 | + puts $out "[read $rn]" | |
| 94 | + close $rn | |
| 95 | + puts $out "</td></tr>" | |
| 96 | + } | |
| 97 | +} | |
| 98 | +puts $out "<tr><td colspan=5><hr></td></tr>" | |
| 99 | + | |
| 100 | +puts $out {</table> | |
| 96 | 101 | </body> |
| 97 | 102 | </html> |
| 98 | 103 | } |
| 104 | + | |
| 105 | +close $out | |
| 106 | + | |
| 107 | +# Generate the checksum page | |
| 108 | +# | |
| 109 | +set out [open fossil_download_checksums.html w] | |
| 110 | +puts $out {<html> | |
| 111 | +<title>Fossil Download Checksums</title> | |
| 112 | +<body> | |
| 113 | +<h1 align="center">Checksums For Fossil Downloads</h1> | |
| 114 | +<p>The following table shows the SHA1 checksums for the precompiled | |
| 115 | +binaries available on the | |
| 116 | +<a href="http://www.fossil-scm.org/download.html">Fossil website</a>.</p> | |
| 117 | +<pre>} | |
| 118 | + | |
| 119 | +foreach file [lsort [glob -nocomplain download/fossil-*.zip]] { | |
| 120 | + set sha1sum [lindex [exec sha1sum $file] 0] | |
| 121 | + puts $out "$sha1sum [file tail $file]" | |
| 122 | +} | |
| 123 | +puts $out {</pre></body></html} | |
| 124 | +close $out | |
| 99 | 125 |
| --- www/mkdownload.tcl | |
| +++ www/mkdownload.tcl | |
| @@ -1,11 +1,13 @@ | |
| 1 | #!/usr/bin/tclsh |
| 2 | # |
| 3 | # Run this script to build the "download.html" page on standard output. |
| 4 | # |
| 5 | # |
| 6 | puts \ |
| 7 | {<html> |
| 8 | <head> |
| 9 | <title>Fossil: Downloads</title> |
| 10 | <link rel="stylesheet" href="/fossil/style.css" type="text/css" |
| 11 | media="screen"> |
| @@ -22,14 +24,17 @@ | |
| 22 | <p> |
| 23 | |
| 24 | <center><font size=4> |
| 25 | <b>To install Fossil →</b> download the stand-alone executable |
| 26 | and put it on your $PATH. |
| 27 | </font><p> |
| 28 | RPMs available |
| 29 | <a href="http://download.opensuse.org/repositories/home:/rmax:/fossil/"> |
| 30 | here</a> |
| 31 | </center> |
| 32 | |
| 33 | <table cellpadding="10"> |
| 34 | } |
| 35 | |
| @@ -49,13 +54,13 @@ | |
| 49 | append dt "[string range $datetime 6 7] " |
| 50 | append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:" |
| 51 | append dt "[string range $datetime 12 13]" |
| 52 | set link [string map {{ } +} $dt] |
| 53 | set hr http://www.fossil-scm.org/fossil/timeline?c=$link&y=ci |
| 54 | puts "<tr><td colspan=6 align=left><hr>" |
| 55 | puts "<center><b><a href=\"$hr\">$dt</a></b></center>" |
| 56 | puts "</td></tr>" |
| 57 | |
| 58 | foreach {prefix suffix img desc} { |
| 59 | fossil-linux-x86 zip linux.gif {Linux x86} |
| 60 | fossil-linux-amd64 zip linux64.gif {Linux x86_64} |
| 61 | fossil-macosx-x86 zip mac.gif {Mac 10.5 x86} |
| @@ -72,27 +77,48 @@ | |
| 72 | set units MiB |
| 73 | } elseif {$size>1024} { |
| 74 | set size [format %.2f [expr {$size/(1024.0)}]] |
| 75 | set units KiB |
| 76 | } |
| 77 | puts "<td align=center valign=bottom><a href=\"$filename\">" |
| 78 | puts "<img src=\"build-icons/$img\" border=0><br>$desc</a><br>" |
| 79 | puts "$size $units</td>" |
| 80 | } else { |
| 81 | puts "<td> </td>" |
| 82 | } |
| 83 | } |
| 84 | puts "</tr>" |
| 85 | if {[file exists download/releasenotes-$datetime.html]} { |
| 86 | puts "<tr><td colspan=6 align=left>" |
| 87 | set rn [open download/releasenotes-$datetime.html] |
| 88 | puts "[read $rn]" |
| 89 | close $rn |
| 90 | puts "</td></tr>" |
| 91 | } |
| 92 | } |
| 93 | puts "<tr><td colspan=5><hr></td></tr>" |
| 94 | |
| 95 | puts {</table> |
| 96 | </body> |
| 97 | </html> |
| 98 | } |
| 99 |
| --- www/mkdownload.tcl | |
| +++ www/mkdownload.tcl | |
| @@ -1,11 +1,13 @@ | |
| 1 | #!/usr/bin/tclsh |
| 2 | # |
| 3 | # Run this script to build the "download.html" page. Also generate |
| 4 | # the fossil_download_checksums.html page. |
| 5 | # |
| 6 | # |
| 7 | set out [open download.html w] |
| 8 | puts $out \ |
| 9 | {<html> |
| 10 | <head> |
| 11 | <title>Fossil: Downloads</title> |
| 12 | <link rel="stylesheet" href="/fossil/style.css" type="text/css" |
| 13 | media="screen"> |
| @@ -22,14 +24,17 @@ | |
| 24 | <p> |
| 25 | |
| 26 | <center><font size=4> |
| 27 | <b>To install Fossil →</b> download the stand-alone executable |
| 28 | and put it on your $PATH. |
| 29 | </font><p><small> |
| 30 | RPMs available |
| 31 | <a href="http://download.opensuse.org/repositories/home:/rmax:/fossil/"> |
| 32 | here.</a> |
| 33 | Cryptographic checksums for download files are |
| 34 | <a href="http://www.hwaci.com/fossil_download_checksums.html">here</a>. |
| 35 | </small></p> |
| 36 | </center> |
| 37 | |
| 38 | <table cellpadding="10"> |
| 39 | } |
| 40 | |
| @@ -49,13 +54,13 @@ | |
| 54 | append dt "[string range $datetime 6 7] " |
| 55 | append dt "[string range $datetime 8 9]:[string range $datetime 10 11]:" |
| 56 | append dt "[string range $datetime 12 13]" |
| 57 | set link [string map {{ } +} $dt] |
| 58 | set hr http://www.fossil-scm.org/fossil/timeline?c=$link&y=ci |
| 59 | puts $out "<tr><td colspan=6 align=left><hr>" |
| 60 | puts $out "<center><b><a href=\"$hr\">$dt</a></b></center>" |
| 61 | puts $out "</td></tr>" |
| 62 | |
| 63 | foreach {prefix suffix img desc} { |
| 64 | fossil-linux-x86 zip linux.gif {Linux x86} |
| 65 | fossil-linux-amd64 zip linux64.gif {Linux x86_64} |
| 66 | fossil-macosx-x86 zip mac.gif {Mac 10.5 x86} |
| @@ -72,27 +77,48 @@ | |
| 77 | set units MiB |
| 78 | } elseif {$size>1024} { |
| 79 | set size [format %.2f [expr {$size/(1024.0)}]] |
| 80 | set units KiB |
| 81 | } |
| 82 | puts $out "<td align=center valign=bottom><a href=\"$filename\">" |
| 83 | puts $out "<img src=\"build-icons/$img\" border=0><br>$desc</a><br>" |
| 84 | puts $out "$size $units</td>" |
| 85 | } else { |
| 86 | puts $out "<td> </td>" |
| 87 | } |
| 88 | } |
| 89 | puts $out "</tr>" |
| 90 | if {[file exists download/releasenotes-$datetime.html]} { |
| 91 | puts $out "<tr><td colspan=6 align=left>" |
| 92 | set rn [open download/releasenotes-$datetime.html] |
| 93 | puts $out "[read $rn]" |
| 94 | close $rn |
| 95 | puts $out "</td></tr>" |
| 96 | } |
| 97 | } |
| 98 | puts $out "<tr><td colspan=5><hr></td></tr>" |
| 99 | |
| 100 | puts $out {</table> |
| 101 | </body> |
| 102 | </html> |
| 103 | } |
| 104 | |
| 105 | close $out |
| 106 | |
| 107 | # Generate the checksum page |
| 108 | # |
| 109 | set out [open fossil_download_checksums.html w] |
| 110 | puts $out {<html> |
| 111 | <title>Fossil Download Checksums</title> |
| 112 | <body> |
| 113 | <h1 align="center">Checksums For Fossil Downloads</h1> |
| 114 | <p>The following table shows the SHA1 checksums for the precompiled |
| 115 | binaries available on the |
| 116 | <a href="http://www.fossil-scm.org/download.html">Fossil website</a>.</p> |
| 117 | <pre>} |
| 118 | |
| 119 | foreach file [lsort [glob -nocomplain download/fossil-*.zip]] { |
| 120 | set sha1sum [lindex [exec sha1sum $file] 0] |
| 121 | puts $out "$sha1sum [file tail $file]" |
| 122 | } |
| 123 | puts $out {</pre></body></html} |
| 124 | close $out |
| 125 |