summary refs log tree commit diff stats
path: root/boudin.scm
diff options
context:
space:
mode:
Diffstat (limited to 'boudin.scm')
-rw-r--r--boudin.scm9
1 files changed, 5 insertions, 4 deletions
diff --git a/boudin.scm b/boudin.scm index b56b93b..9135a9e 100644 --- a/boudin.scm +++ b/boudin.scm
@@ -11,6 +11,8 @@
11 (chicken pathname) 11 (chicken pathname)
12 (chicken process-context)) 12 (chicken process-context))
13 13
14;; State variables
15
14(define site-posts 16(define site-posts
15 (make-parameter '())) 17 (make-parameter '()))
16 18
@@ -28,9 +30,6 @@
28 30
29(define (go!) 31(define (go!)
30 (eprint "Building " (site-name) "...") 32 (eprint "Building " (site-name) "...")
31 (when (file-exists? (site-config))
32 (with-progress (string-append "Config found, loading: " (site-config))
33 (lambda () (load (site-config)))))
34 (for-each (lambda (f) 33 (for-each (lambda (f)
35 (with-progress (string-append "Copying " f " to " (site-output)) 34 (with-progress (string-append "Copying " f " to " (site-output))
36 (lambda () (copy-static f)))) (site-files)) 35 (lambda () (copy-static f)))) (site-files))
@@ -52,7 +51,9 @@
52 (let loop ((args args)) 51 (let loop ((args args))
53 (cond 52 (cond
54 ((null? args) 53 ((null? args)
55 (for-each print (site-posts)) 54 (when (file-exists? (site-config))
55 (with-progress (string-append "Loading " (site-config))
56 (lambda () (load (site-config)))))
56 (go!)) 57 (go!))
57 ;; Configuration file: -c FILE 58 ;; Configuration file: -c FILE
58 ((equal? (car args) "-c") 59 ((equal? (car args) "-c")