9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
-
-
+
+
+
+
+
+
|
(declare (uses common))
(include "common_records.scm")
(define (setup-env-defaults db fname run-id already-seen #!key (environ-patt #f))
(let* ((keys (get-keys db))
(keyvals (get-key-vals db run-id))
(keyval
(thekey (string-intersperse (map (lambda (x)(if x x "-na-")) keyvals) "/"))
(confdat (read-config fname #f #f environ-patt: environ-patt))
(whatfound (make-hash-table))
(sections (list "default" thekey)))
(debug:print 4 "Using key=\"" thekey "\"")
(for-each
(lambda (key val)
(setenv (vector-ref key 0) val))
keys keyvals)
(for-each
(lambda (section)
(let ((section-dat (hash-table-ref/default confdat section #f)))
(if section-dat
(for-each
(lambda (envvar)
(hash-table-set! whatfound section (+ (hash-table-ref/default whatfound section 0) 1))
|