Diff
Not logged in

Differences From Artifact [bed106bd42]:

To Artifact [a81d1d41c6]:


16
17
18
19
20
21
22






















23
24
25
26
27
28
29
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51







+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+








#
# NOTE: Use our own namespace here because even though we do not directly
#       support namespaces ourselves, we do not want to pollute the global
#       namespace if this script actually ends up being evaluated in Tcl.
#
namespace eval ::PackageDownloader {
  #
  # NOTE: This procedure evaluates the package downloader client settings
  #       script file, if it exists.  Any script errors raised are not
  #       masked.  The script argument must be the fully qualified path
  #       and file name for the primary package downloader client script
  #       file.  An identical procedure is defined in the package repository
  #       client.
  #
  proc maybeReadSettingsFile { script } {
    if {[string length $script] == 0 || \
        ![file exists $script] || ![file isfile $script]} then {
      return
    }

    set fileName [appendArgs \
        [file rootname $script] .settings [file extension $script]]

    if {[file exists $fileName] && [file isfile $fileName]} then {
      uplevel 1 [list source $fileName]
    }
  }

  #
  # NOTE: This procedure sets up the default values for all configuration
  #       parameters used by the package downloader client.  There are no
  #       arguments.
  #
  proc setupDownloadVars {} {
    #
263
264
265
266
267
268
269






270
271
272
273
274
275
276
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304







+
+
+
+
+
+







        addToAutoPath $language $downloadDirectory
      }
    }

    return $downloadDirectories
  }

  #
  # NOTE: Attempt to read optional settings file now.  This may override
  #       one or more of the variable setup in the next step.
  #
  maybeReadSettingsFile [info script]

  #
  # NOTE: Setup the variables, within this namespace, used by this script.
  #
  setupDownloadVars

  #
  # NOTE: This package requires the package repository client package.