System.Data.SQLite
Check-in [9d0de1fb02]
Not logged in

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

Overview
Comment:Make the download page updating script easier to use.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 9d0de1fb029a527a798d442b5f864ad61ecd81d5
User & Date: mistachkin 2015-07-30 16:26:52
Context
2015-07-30
16:27
Update some incorect SHA1 hashes on the download page. check-in: 36e46ec005 user: mistachkin tags: trunk
16:26
Make the download page updating script easier to use. check-in: 9d0de1fb02 user: mistachkin tags: trunk
00:15
Update SQLite core library to the 3.8.11.1 release. check-in: e2757bd694 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Setup/updateFileInfo.tcl.

    57     57   
    58     58   #
    59     59   # NOTE: Grab the name of the file to be updated from the command line, if
    60     60   #       available; otherwise, use the default (i.e. "../www/downloads.wiki").
    61     61   #
    62     62   if {[info exists argv] && [llength $argv] > 0} then {
    63     63     set updateFileName [lindex $argv 0]
    64         -} else {
           64  +}
           65  +
           66  +if {![info exists updateFileName] || \
           67  +    [string length $updateFileName] == 0} then {
    65     68     set updateFileName [file join $root www downloads.wiki]
    66     69   }
    67     70   
    68     71   #
    69     72   # NOTE: Grab the directory containing the files referenced in the data of the
    70     73   #       file to be updated from the command line, if available; otherwise, use
    71     74   #       the default (i.e. "./Output").
    72     75   #
    73     76   if {[info exists argv] && [llength $argv] > 1} then {
    74         -  set directory [lindex $argv 1]
    75         -} else {
    76         -  set directory [file join $path Output]
           77  +  set outputDirectory [lindex $argv 1]
           78  +}
           79  +
           80  +if {![info exists outputDirectory] || \
           81  +    [string length $outputDirectory] == 0} then {
           82  +  set outputDirectory [file join $path Output]
    77     83   }
    78     84   
    79     85   #
    80     86   # NOTE: Setup the regular expression pattern with the necessary captures.  This
    81     87   #       pattern is mostly non-greedy; however, at the end we need to match
    82     88   #       exactly 40 hexadecimal characters.  In theory, in Tcl, this could have
    83     89   #       an undefined result due to the mixing of greedy and non-greedy
................................................................................
   113    119     #
   114    120     foreach {dummy fileName fileSize fileHash} \
   115    121         [regexp -all -inline -nocase -- $pattern $data] {
   116    122       #
   117    123       # NOTE: Get the fully qualified file name based on the configured
   118    124       #       directory.
   119    125       #
   120         -    set fullFileName [file join $directory [file tail $fileName]]
          126  +    set fullFileName [file join $outputDirectory [file tail $fileName]]
   121    127   
   122    128       #
   123    129       # NOTE: If the file does not exist, issue a warning and skip it.
   124    130       #
   125    131       if {![file exists $fullFileName]} then {
   126    132         puts stdout "WARNING: File \"$fullFileName\" does not exist, skipped."
   127    133         continue