Index: Setup/updateFileInfo.tcl ================================================================== --- Setup/updateFileInfo.tcl +++ Setup/updateFileInfo.tcl @@ -59,23 +59,29 @@ # NOTE: Grab the name of the file to be updated from the command line, if # available; otherwise, use the default (i.e. "../www/downloads.wiki"). # if {[info exists argv] && [llength $argv] > 0} then { set updateFileName [lindex $argv 0] -} else { +} + +if {![info exists updateFileName] || \ + [string length $updateFileName] == 0} then { set updateFileName [file join $root www downloads.wiki] } # # NOTE: Grab the directory containing the files referenced in the data of the # file to be updated from the command line, if available; otherwise, use # the default (i.e. "./Output"). # if {[info exists argv] && [llength $argv] > 1} then { - set directory [lindex $argv 1] -} else { - set directory [file join $path Output] + set outputDirectory [lindex $argv 1] +} + +if {![info exists outputDirectory] || \ + [string length $outputDirectory] == 0} then { + set outputDirectory [file join $path Output] } # # NOTE: Setup the regular expression pattern with the necessary captures. This # pattern is mostly non-greedy; however, at the end we need to match @@ -115,11 +121,11 @@ [regexp -all -inline -nocase -- $pattern $data] { # # NOTE: Get the fully qualified file name based on the configured # directory. # - set fullFileName [file join $directory [file tail $fileName]] + set fullFileName [file join $outputDirectory [file tail $fileName]] # # NOTE: If the file does not exist, issue a warning and skip it. # if {![file exists $fullFileName]} then {