9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
;; PURPOSE.
;;======================================================================
;;======================================================================
;; Config file handling
;;======================================================================
;; return list (path fullpath configname)
(define (find-config configname)
(let* ((cwd (string-split (current-directory) "/")))
(let loop ((dir cwd))
(let* ((path (conc "/" (string-intersperse dir "/")))
(fullpath (conc path "/" configname)))
(if (file-exists? fullpath)
|
>
>
>
>
>
>
>
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
;; PURPOSE.
;;======================================================================
;;======================================================================
;; Config file handling
;;======================================================================
(use regex regex-case)
(declare (unit configf))
(declare (uses common))
(declare (uses process))
(include "common_records.scm")
;; return list (path fullpath configname)
(define (find-config configname)
(let* ((cwd (string-split (current-directory) "/")))
(let loop ((dir cwd))
(let* ((path (conc "/" (string-intersperse dir "/")))
(fullpath (conc path "/" configname)))
(if (file-exists? fullpath)
|