commit b469b2f
chld
·
2026-09-12 21:16:02 +0000 UTC
parent 3daffb4
read variables from a config file
1 files changed,
+12,
-12
+12,
-12
1@@ -1,18 +1,18 @@
2 (when (file-exists? "/etc/dull.conf.sh")
3-(let rc
4- (
5- (c (call-with-input-file "/etc/dull.conf.sh" (lambda (f)
6- (string-split (read-string f) #\newline)))
7- )
8- (n 0)
9- )
10+ (let rc
11+ (
12+ (c (call-with-input-file "/etc/dull.conf.sh" (lambda (f)
13+ (string-split (read-string f) #\newline)))
14+ )
15+ (n 0)
16+ )
17
18- (unless (= n (length c))
19- (let ((cl (string-split (list-ref c n) #\=)))
20- (setenv (car cl) (cadr cl)))
21- (rc c (+ n 1))
22+ (unless (= n (length c))
23+ (let ((cl (string-split (list-ref c n) #\=)))
24+ (setenv (car cl) (cadr cl)))
25+ (rc c (+ n 1))
26 ))
27-)
28+ )
29
30 (define DULL (basename (car (command-line))))
31 (define DULL_DIR "/var/tmp/dtr")